MCPcopy Create free account
hub / github.com/Effect-TS/effect / memoizeThunk

Function memoizeThunk

packages/effect/src/SchemaAST.ts:4065–4068  ·  view source on GitHub ↗
(thunk: Suspend["thunk"])

Source from the content-addressed store, hash-verified

4063}
4064
4065function memoizeThunk(thunk: Suspend["thunk"]): Suspend["thunk"] {
4066 let ast: AST
4067 return () => ast ??= thunk()
4068}
4069
4070// -----------------------------------------------------------------------------
4071// Checks

Callers 2

constructorMethod · 0.85
projectFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected