0.1.17 #18
18
src/Layers/trpc/tests.ts
Normal file
18
src/Layers/trpc/tests.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
import { Console, Effect, identity } from "effect"
|
||||
|
||||
|
||||
const expansiveComputation = Effect.gen(function*() {
|
||||
yield* Console.log("executing")
|
||||
return "value"
|
||||
}).pipe(
|
||||
Effect.cached,
|
||||
)
|
||||
|
||||
await Effect.gen(function*() {
|
||||
const cached = yield* expansiveComputation
|
||||
yield* Console.log(yield* cached)
|
||||
yield* Console.log(yield* cached)
|
||||
yield* Console.log(yield* cached)
|
||||
}).pipe(
|
||||
Effect.runPromise
|
||||
)
|
||||
Reference in New Issue
Block a user