September 2017
Beginner to intermediate
396 pages
9h 46m
English
In this recipe, we created an instance of Functor for the binary tree that we defined. When we create an instance of a Functor, we have to follow these laws of Functor:
For the binary tree that we have defined, these laws are followed. If we apply the identity function id, then we apply it to the value in the node and subtrees. Since id does not change the value and we preserve the structure of the tree, an application of an identity function to our binary ...
Read now
Unlock full access