How to Build a Functional API
summary
Migrates a large economics Excel model to Scala by parsing named ranges with Apache POI and turning every partial accessor into a total one that returns an Either parser error. Builds a safe-cell wrapper, uses Apache POI and the refine library to push validation earlier, and leverages Traverse/sequence plus applicative instances so six small parsers derive all others; result is an extensible Parser trait that produces precise error variants (missing name, missing cell, invalid format).
AI-written summary · about
chapters (12)
- 0:00Introduction
- 0:46Partial Functions
- 7:43Use Case
- 10:00Excel API
- 16:50Building Blocks
- 23:40Parser
- 25:35Production
- 26:38Product
- 27:48Flatmap
- 28:38Cartesian Frontier
- 30:11Review
- 31:09Conclusion








