Commit affe4be
authored
feat: add flatMapMaybe method to handle optional transformations (#204)
* feat: add flatMapMaybe method to handle optional transformations
Introduced the flatMapMaybe method to the IResult interface and its implementations (OkResult and FailResult). This new method applies a function returning an IMaybe to the Ok value. If the function returns Some, it continues with Ok; if None, it results in a Fail with the specified error. If the original Result is a Fail, it remains unchanged. Accompanying tests verify behavior for both Ok and Fail scenarios. Additionally, updated package.json to specify pnpm as the package manager.
* docs1 parent 2dd3296 commit affe4be
File tree
4 files changed
+2246
-43
lines changed- src
- maybe
- result
4 files changed
+2246
-43
lines changed
0 commit comments