- Learning Functional Programming in Go
- Lex Sheehan
- 58字
- 2021-07-02 23:13:47
FantasyLand JavaScript specification
The FantasyLand project specifies interoperability of common algebraic structures:
![](https://epubservercos.yuewen.com/6176FA/19470400908922906/epubprivate/OEBPS/Images/Chapter_60.jpg?sign=1739054672-7dd5bsXhwlN3zeeOjPrV7RXsn4jO3vVK-0-68871a091fd5c2899ed38a67e6bcc262)
Each data type in the hierarchical diagram is called an algebraic data type because each consists of algebra, that is, a set of values, a set of operators that it is closed under, and the rules it must obey.
Let's take a simple example, the Setoid.