(f: () => A)
| 162 | } |
| 163 | |
| 164 | export function lazy<A>(f: () => A): () => A { |
| 165 | let tmp: A | undefined |
| 166 | let done = false |
| 167 | return () => { |
| 168 | if (done) { |
| 169 | return tmp! |
| 170 | } |
| 171 | tmp = f() |
| 172 | done = true |
| 173 | return tmp |
| 174 | } |
| 175 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…