Transform the Ok value, passing Err through unchanged. Dual-form: call data-first or curried (for use with pipe).
Ok
Err
map(ok(2), (n) => n * 3); // Ok 6 — data-firstpipe(ok("x"), map((s) => s.length));// Ok 1 — curried Copy
map(ok(2), (n) => n * 3); // Ok 6 — data-firstpipe(ok("x"), map((s) => s.length));// Ok 1 — curried
Transform the
Okvalue, passingErrthrough unchanged. Dual-form: call data-first or curried (for use with pipe).