By associativity, I mean the composition of functions in which the order of the above functions is not important for result. Example from arithmetic:
(a + b) + c = a + (b + c)
Distributivity can be understood as the consistency of two functions on one set of three arguments. Example:
x * (y + z) = (x * y) + (x * z)
The Alt provided by fp-ts Array is essentially a list concatenation function. Let’s see an example:
The Alt provided by fp-ts Option is a function that takes the other option if the main one is none. Let’s see an example:
With this article, I want to start a series on fp-ts. If you have a desire to make out something specific provided by fp-ts, write in the comments.Thanks for reading!