Name: Anonymous 2013-11-11 22:20
Did you ever tried this thing?
FizzBuzzBazz in 62 characters:
Currying:
Composing Functions:
Comprehensions:
It compiles to JavaScript, so basically is a CoffeeScript well done.
http://livescript.net/
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/