Patch Changes
-
#2067
d0b911c
Thanks @tim-smart! - add releaseAll api to SemaphoreYou can use
semphore.releaseAll
to atomically release all the permits of a
Semaphore. -
#2071
330e1a4
Thanks @tim-smart! - add Option.orElseSomeAllows you to specify a default value for an Option, similar to
Option.getOrElse, except the return value is still an Option.import * as O from "effect/Option"; import { pipe } from "effect/Function"; assert.deepStrictEqual( pipe( O.none(), O.orElseSome(() => "b"), ), O.some("b"), ); assert.deepStrictEqual( pipe( O.some("a"), O.orElseSome(() => "b"), ), O.some("a"), );
-
#2057
6928a2b
Thanks @joepjoosten! - Fix for possible stack overflow errors when using Array.push with spread operator arguments