Browse Source

fix

primary
CismonX 5 months ago
parent
commit
b0abdd4619
Signed by: cismonx
GPG Key ID: 3094873E29A482FB
  1. 4
      README.md
  2. 10
      src/runtime.ts

4
README.md

@ -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

10
src/runtime.ts

@ -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;

Loading…
Cancel
Save