A categorical programming language
修订版 | 2e72e243b753fa577512b238c184a8a52e0422a2 (tree) |
---|---|
时间 | 2021-11-24 13:50:27 |
作者 | Corbin <cds@corb...> |
Commiter | Corbin |
Factor f-lt compositions.
@@ -1,2 +1,2 @@ | ||
1 | 1 | (comp (comp (f/error @0) f/sqr) |
2 | - (comp (pair id (fun/const (comp f/1000 f-recip))) f-lt)) | |
2 | + (f/ltpair id (fun/const (comp f/1000 f-recip)))) |
@@ -0,0 +1 @@ | ||
1 | +(comp (pair @0 @1) f-lt) |
@@ -1,6 +1,6 @@ | ||
1 | 1 | (comp |
2 | 2 | (iter-fractal @0 @1) |
3 | 3 | (comp |
4 | - (list/filter (comp (pair v2/norm (fun/const f/2)) f-lt)) | |
4 | + (list/filter (f/ltpair v2/norm (fun/const f/2))) | |
5 | 5 | (comp list/len |
6 | 6 | (f/divpair nat/to-f (fun/const (comp @1 nat/to-f)))))) |
@@ -0,0 +1 @@ | ||
1 | +(curry (fun/apppair snd (comp fst @0))) |
@@ -0,0 +1 @@ | ||
1 | +(curry (fun/apppair snd fst)) |
@@ -1,5 +1,5 @@ | ||
1 | 1 | (v3/triple id |
2 | 2 | (comp |
3 | - (comp (pair id (fun/const f-zero)) f-lt) | |
3 | + (f/ltpair id (fun/const f-zero)) | |
4 | 4 | (comp either (case f-zero f-one))) |
5 | 5 | id) |
@@ -1,25 +1,17 @@ | ||
1 | 1 | * list/eq : [X × X, 2] → [[X] × [X], 2] |
2 | 2 | * list/zip : [X] × [Y] → [X × Y] |
3 | 3 | * list/tail : [X] → [X] |
4 | -* list/unfold : [Y, X × Y + 1] → [Y, [X]] | |
5 | 4 | * list/append : [X] × [X] → [X] |
6 | 5 | * rat |
7 | 6 | * refactoring from the bikeshed: ignore -> ! |
8 | 7 | * Typechecker needs to handle holes |
9 | 8 | * Typechecker should handle polymorphism better |
10 | 9 | * Typechecker errors are inscrutable |
11 | -* Draw complex functions | |
12 | - * hsl2rgb | |
13 | - * complex to HSL | |
14 | 10 | * Trigonometric functions |
15 | 11 | * f-atan2 added, need f-sin and f-cos? |
16 | 12 | * Transcendental and other constants |
17 | 13 | * Euler's constant e |
18 | - * pi | |
19 | 14 | * Euler's constant gamma |
20 | 15 | * Remove movelist djinn, maybe? |
21 | - * At least give up on having the clauses magically sorted; sort them in the | |
22 | - same order as the docs and cammy-run | |
23 | -* f/ltpair | |
24 | 16 | * Double-negation monad for CPS? |
25 | 17 | * fun/name should always start from 1 |