Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

LiveScript

Name: Anonymous 2013-11-11 22:20

Did you ever tried this thing?

FizzBuzzBazz in 62 characters:

[++x>?[k+\zz for k,v of{Fi:3,Bu:5,Ba:7}|x%v<1]*'' for x to 99]


Currying:

times = (x, y) --> x * y
times 2, 3 #=> 6 (normal use works as expected)
double = times 2
double 5 #=> 10


Composing Functions:

even = (x) -> x % 2 == 0
invert = (x) -> not x
odd = invert << even


Comprehensions:

r = [x + y for x in [1, 2] for y in ['a', 'b']]
r #=> ['1a', '1b', '2a', '2b']


It compiles to JavaScript, so basically is a CoffeeScript well done.
http://livescript.net/

Name: Anonymous 2013-11-11 23:39

SymtaScript?

Name: Anonymous 2013-11-12 0:05

A sugarcoated turd is still a turd

Name: Anonymous 2013-11-12 0:59

Haskell: A turdcoated turd is still a turd

Name: Anonymous 2013-11-12 1:02

>>4
fuck you fagshit

Name: Anonymous 2013-11-12 1:05

TypeScript is better.

Name: Anonymous 2013-11-12 3:03

>>6
huh? that shit was created by Microsoft, why I would use it?

Name: Anonymous 2013-11-12 15:38

>>7
because it's better

Name: Anonymous 2013-11-12 17:38

[++x>?[k+\zz for k,v of{Fi:3,Bu:5,Ba:7}|x%v<1]*'' for x to 99]

Wow, thats unreadable.

Here's much more clear FIOC solution. Only 33 characters more (note that it prints correctly Fizz instead of Fi)

[''.join(int(b<1)*a for (a,b) in [('Fizz',x%3),('Buzz',x%5),('Bazz',x%7)]) for x in range(100)]

Name: Anonymous 2013-11-12 17:46

>>9
''.join
FIOC quality!

Name: Anonymous 2016-07-19 21:20

check em

Name: Anonymous 2016-07-20 1:37

If you want a functional language that compiles to Javascript, check out [PureScript](http://www.purescript.org/). It has almost 1000 more stars on Github than does Livescript, so it's probably a better choice.

Name: Anonymous 2016-07-20 1:45

>>12
goys aren't allowed to post here

Name: Anonymous 2016-07-20 1:45

also Elm

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List