You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Curried version of `chain` for `Either`. This allows chaining transformations on the **Right** value of `Either`, using a functional composition style.
Curried version of `chain` for `Result`. This allows you to chain transformations on the Ok value in a functional pipeline.
114
130
115
131
```ts
116
-
import { chainR } from'holo-fn/result';
132
+
import { chainR, Ok } from'holo-fn/result';
117
133
118
134
const result =pipe(
119
135
newOk(10),
@@ -131,7 +147,7 @@ console.log(result); // 15
131
147
Curried version of `unwrapOr` for `Result`. This provides a cleaner way to unwrap the value in a `Result`, returning a default value if it's `Err`.
132
148
133
149
```ts
134
-
import { unwrapOrR } from'holo-fn/result';
150
+
import { Ok, unwrapOrR } from'holo-fn/result';
135
151
136
152
const result =pipe(
137
153
newOk(42),
@@ -148,7 +164,7 @@ console.log(result); // 42
148
164
Curried version of `match` for `Result`. This allows you to handle both `Ok` and `Err` in a functional way, providing a clean way to handle both cases.
0 commit comments