Skip to content

Instantly share code, notes, and snippets.

@ebadico
ebadico / README.md
Created May 12, 2021 16:52 — forked from rrag/README.md
Yet another tutorial and Cheat sheet to Functional programming

There are many tutorials and articles available online which explain functional programming. Examples show small functions, which are composed into others which again get composed. It is hard to imagine how it would all work, then come the analogies and then the math. While the math is necessary to understand it can be difficult to grasp initially. The analogies on the other hand, (at least for me) are not relatable. Some articles assume the reader knows the different terminologies of FP. Over all I felt it is not inviting to learn.

This introduction is for those who have had a tough time understanding those analogies, taken the plunge to functional programming but still have not been able to swim. This is yet another tutorial on functional programming

Terminology

Functions as first class citizens

Functions are first class means they are just like anyone else, or rather they are not special, they behave the same as say primitives or strings or objects.

Keybase proof

I hereby claim:

  • I am mohammad-ali-7 on github.
  • I am mohammad_ali (https://keybase.io/mohammad_ali) on keybase.
  • I have a public key whose fingerprint is 16CC FEE5 6A31 8711 EA23 F9CC 9D6C F23D ECD4 92A2

To claim this, I am signing this object: