Introduction to fp-ts – Part 1


Functional programming is well established at REA in Scala, but less so in Typescript. While Scala has language features built in that make doing FP easier, we still rely on libraries to fully take advantage of the things FP can help us with. Typescript is similar, and although it has less built-in language support, we can use a library to provide the pieces we need to do FP in Typescript. One such library is fp-ts. This post will talk about some of the things fp-ts does for us and how it helps us write better, safer code in Typescript. We will start with things to help us with null and undefined, then look at synchronous error handling. The next post will cover asynchronous functions and error handling.



首页 - Wiki
Copyright © 2011-2023 iteam. Current version is 2.118.1. UTC+08:00, 2023-10-05 10:34
浙ICP备14020137号-1 $访客地图$