Re:Snake in Elm with WebGL
by winstonewert on Monday June 26, 2017 @07:24PM
(#14641266)
I suppose it would make more sense to write these as lambdas in a c style syntax
nums.map(|sublist| sublist.map(|num| add(num, 5))
Maybe I haven't done enough functional programming yet, but I still like the explicitness of the C-style over the functional style.
Add 5 to each num in a list (using a pretend function called `add` in both languages to be fair):
Add 5 to each in a list of list of numbers: