Chapter 06: Example Application
The only "new" concept here is the prop
function. As far as I can tell, fp-ts
does not provide an equivalent function. A more powerful library called monocle-ts is recommended.
I've provided my own implementation below that should work for the context of this book:
This implementation has some limitations. Typescript will not allow you to partially apply this function.
As far as I know, this is a limitation of the type system.
A translation of the example from the book using fp-ts
:
Last updated