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-2024 iteam. Current version is 2.123.4. UTC+08:00, 2024-04-16 19:05
浙ICP备14020137号-1 $访客地图$