Initial data commit

This commit is contained in:
Ingy döt Net 2023-07-01 11:58:00 -04:00
parent 72d218235f
commit f23f22d71c
199087 changed files with 3378941 additions and 0 deletions

View file

@ -0,0 +1 @@
double = [1,2,3].map (x) -> x*2

View file

@ -0,0 +1,3 @@
fn = -> return 8
sum = (a, b) -> a() + b()
sum(fn, fn) # => 16

View file

@ -0,0 +1,7 @@
bowl = ["Cheese", "Tomato"]
smash = (ingredient) ->
return "Smashed #{ingredient}"
contents = smash ingredient for ingredient in bowl
# => ["Smashed Cheese", "Smashed Tomato"]

View file

@ -0,0 +1,5 @@
double = (x) -> x*2
triple = (x) -> x*3
addOne = (x) -> x+1
addOne triple double 2 # same as addOne(triple(double(2)))

View file

@ -0,0 +1 @@
(-> -> -> -> 2 )()()()() # => 2

View file

@ -0,0 +1,4 @@
((x)->
2 + x(-> 5)
)((y) -> y()+3)
# result: 10