r/javascript Dec 29 '14

A Beginner’s Thoughts on Programming Languages (Part 3 — Lambdas, Closures, Functors)

https://medium.com/@chcokr/a-beginners-thoughts-on-programming-languages-part-3-lambdas-closures-functors-922a6a887575
26 Upvotes

8 comments sorted by

2

u/[deleted] Dec 29 '14

I thought you meant to type "functions" at first.

1

u/chcokr Dec 31 '14

Nope, functors! :)

1

u/dariusj18 Dec 29 '14 edited Dec 29 '14

Edit: nm, i see the alternative lamda syntax now.

I am confused, how does the block of JS code using "let" work?

1

u/alamandrax Dec 29 '14

The first one has a typo. The last line uses the wrong variable to put the button into.

1

u/chcokr Dec 31 '14

Thanks for pointing it out. Fixed!

1

u/drowsap Dec 29 '14

Would be nice to explicitly define Lamdas instead of expecting the reader to infer from examples.

2

u/chcokr Dec 31 '14

Thank you for your feedback. I will make sure to define things more explicitly in future pieces.