Skip to content

Commit 0f79aa2

Browse files
committed
up
1 parent 94f9972 commit 0f79aa2

File tree

1 file changed

+30
-22
lines changed

1 file changed

+30
-22
lines changed

TODO.md

Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
# bug
2+
3+
[bug] `(assert-equal fibonacci fibonacci/1)` fail
4+
5+
- as i how understand it now, this fail,
6+
because of `sameInCtx` can only handle unary function,
7+
and loop forever in the case of `DelayedApply`.
8+
- should be like `readbackInCtx` in the case of `DelayedApply`,
9+
find the head of the `DelayedApply` to handle non unary functions.
10+
11+
[bug] `(assert-equal ackermann ackermann/1)` fail
12+
13+
- maybe is it possible to extend the algorithm to handle `ackermann`,
14+
if not, is it related to different classes of recursive functions?
15+
16+
[bug] why top level wrap need a eta?
17+
18+
```scheme
19+
(define factorial-1 (factorial-wrap factorial-1))
20+
(define (factorial-1 n) ((factorial-wrap factorial-1) n))
21+
```
22+
23+
- can adding lazy evaluation help fix this?
24+
125
# lazy evaluation
226

327
we still can bring back lazy evaluation by lazy + box,
@@ -16,30 +40,14 @@ we need to see why current strategy can handle `Y`.
1640

1741
# recursive lambda
1842

19-
use `RecursiveLambda` instead of `DefinedLambda` -- i tried, but it is to slow
20-
`sameInCtx` -- use head on `DelayedApply`, but only for `RecursiveLambda`
21-
22-
# later
23-
24-
`formatValue` -- use `let` to print closure
43+
use `RecursiveLambda` instead of `DefinedLambda`
2544

26-
# equal
45+
- i tried, but it is too slow
2746

28-
be able to check equivalence of ackermann function.
29-
why delayed-apply is not enough for ackermann function?
30-
is it possible to extend the algorithm to handle it?
31-
if not, is it related to different classes of recursive functions?
32-
33-
we should try to do the same that we did for `length` functions,
34-
extending `ackermann` to see why what works for `length` failed.
35-
36-
no need `ackermann`, `fibonacci` already fails.
47+
`sameInCtx` -- use head on `DelayedApply`, but only for `RecursiveLambda`
3748

38-
why top level wrap need a eta?
49+
- maybe this can pass `fibonacci`, but not `ackermann`
3950

40-
```scheme
41-
(define factorial-1 (factorial-wrap factorial-1))
42-
(define (factorial-1 n) ((factorial-wrap factorial-1) n))
43-
```
51+
# later
4452

45-
can adding lazy evaluation help fix this?
53+
`formatValue` -- use `let` to print closure

0 commit comments

Comments
 (0)