Functional.js part 1


This blog series I will cover the how and why functional in js. This part is about how to compose functions. The next parts will cover Type Classes, fmap, map, fold, monoids, functors, moands and more goodies.

I will not cover higher order function in this series. If you do not know what they are or how they work take a look at this post. Nor will I cover basic array manipulation like map, reduce and filter.

The first thing to understand functional programming is to understand types. When I say types I don’t mean the traditional types of C static languages. I mean a inferred type system like Haskell. The types make easier to understand the functions and analyzes them. (For a more detaild explonation).

We want typechecking so we don’t accidentally try to shove a square peg into a round hole and create bugs in the process.

Read More