An open API service indexing awesome lists of open source software.

https://github.com/i-am-tom/fantas-eel-and-specification

Examples and exercises from the blog series
https://github.com/i-am-tom/fantas-eel-and-specification

algebraic-structures example functional javascript typeclasses

Last synced: 8 months ago
JSON representation

Examples and exercises from the blog series

Awesome Lists containing this project

README

          

# Fantas, Eel, and Specification [![Join the chat at https://gitter.im/fantas-eel-and-specification/Lobby](https://badges.gitter.im/fantas-eel-and-specification/Lobby.svg)](https://gitter.im/fantas-eel-and-specification/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Hello, friends! If you're reading this, I'm either in the process of writing - or have finished writing - a series of **blog posts** on the [Fantasy Land](https://github.com/fantasyland/fantasy-land) specification for typeclasses in JavaScript - hooray!

When _I_ started trying to get to grips with the Fantasy Land spec and its uses, I spent most of my day with this expression:

![Katya reads the Comonad spec](https://media.giphy.com/media/GutiPRFVkTtPa/giphy.gif)

The thing is that a lot of these patterns are going to be **pretty weird** if you're coming from a different paradigm (most likely **OOP**). In any case, it's probably going to be helpful to have some examples. With that in mind, I'm going to fill this repo with exactly that, and refer to it whenever _I_ get stuck.

I'll aim to include **all examples and exercises** from [the blog series](http://www.tomharding.me/2017/03/03/fantas-eel-and-specification/), as well as some new ones as I stumble across them. If you want to contribute, _please_ **submit pull requests** with updates to the current examples, or even exciting new stuff! All discussion is productive, and (if you haven't guessed) I _love_ talking about this stuff. Heads up: I intend to uphold a [**code of conduct**](https://wealljs.org/code-of-conduct), as we're all _hopefully_ more interested in functional programming than upsetting each other. I'm optimistic!

Finally, **ask questions**! I'm by no means an expert, but I'll do my best to be useful, or at least point you in the direction of more helpful people. I don't know about you, but I like the idea of a **functional future** for JS, so it's _totally_ in my best interests to clarify anything that might confuse people.

Thanks!