diff --git a/packages/effect-lens/README.md b/packages/effect-lens/README.md index 8e641a0..813b7f9 100644 --- a/packages/effect-lens/README.md +++ b/packages/effect-lens/README.md @@ -70,8 +70,9 @@ You can get pretty creative! Here's an example of a Lens that points to a specif const lens = Effect.all([ KeyValueStore.KeyValueStore, Effect.succeed("someKey"), + Effect.makeSemaphore(1), ]).pipe( - Effect.map(([kv, key]) => Lens.make({ + Effect.map(([kv, key, semaphore]) => Lens.make({ get: kv.get(key), changes: kv.get(key).pipe( @@ -90,7 +91,7 @@ const lens = Effect.all([ ? kv.set(key, a.value) : kv.remove(key), - lock: Effect.succeed(effect => effect), + lock: Effect.succeed(semaphore.withPermits(1)), })), Effect.provide(BrowserKeyValueStore.layerLocalStorage),