Click on the words for information about subjects and things.
If you'd like to practise using fp-ts
in the wild, here are some exercises
along with unit tests that you can use to increase your 10x-ing.
The tests for each unit are currently skipped, but can be enabled by removing
skip
from the matching test file.
These exercises are for specific types that you will find in fp-ts
.
After we've used a few datatypes we'll start to notice the same old functions (such as map
) coming up over and over. These interfaces, reused between many types, are called typeclasses, these exercises are to help gain a better intuition for them by implementing their functions yourself.
Some more concrete examples of FP in the wild (please feel free to contribute here if you find something worth sharing)
Option | Either | io-ts validator | Store Comonad | Parser | newtypes | dependency injection with Reader
The exercises are in Typescript and be run as such:
yarn install
# tests
yarn test:watch
# typechecker
yarn typescript:watch
The tests for each exercise live in src/tests
, and are all skipped, enable the ones you want to try.