This commit is contained in:
CismonX 2022-02-10 02:43:47 +08:00
parent ecbdb92fe9
commit b0abdd4619
Signed by: cismonx
GPG Key ID: 3094873E29A482FB
2 changed files with 7 additions and 7 deletions

View File

@ -64,8 +64,8 @@ in `node_modules`, until the error no longer applies. Changing
[MIT License]: https://img.shields.io/badge/license-MIT-blue.svg
[Unlambda]: http://www.madore.org/~david/programs/unlambda/
[CPS]: https://en.wikipedia.org/wiki/Continuation-passing_style/
[Tail Call]: https://en.wikipedia.org/wiki/Tail_call/
[CPS]: https://en.wikipedia.org/wiki/Continuation-passing_style
[Tail Call]: https://en.wikipedia.org/wiki/Tail_call
[TSC checker]:
https://github.com/microsoft/TypeScript/blob/v4.1.2/src/compiler/checker.ts
[PR 29602]: https://github.com/microsoft/TypeScript/pull/29602

View File

@ -97,8 +97,8 @@ type Apply<L /* extends Func */, R /* extends Func */, Cont, IO> =
* Evalutate an expression.
*/
export type Eval<E /* extends Expression */, Cont, IO> =
// Expression is a function, apply the continuation.
E extends Func ? Continue<Cont, E, IO>
// Expression is an application, evaluate the left part (the "operator").
: E extends [infer L, infer R] ? Eval<L, ['a1', R, Cont], IO>
: never;
// Expression is a function, apply the continuation.
E extends Func ? Continue<Cont, E, IO>
// Expression is an application, evaluate the left part (the "operator").
: E extends [infer L, infer R] ? Eval<L, ['a1', R, Cont], IO>
: never;