• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#windowsobjective-ccocoaqt誰得pythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A categorical programming language


Commit MetaInfo

修订版62cedf9d54c7cdb27e2233e142f1a8bb686b7c6e (tree)
时间2021-08-17 00:49:42
作者Corbin <cds@corb...>
CommiterCorbin

Log Message

Clean up and start thinking about publication.

更改概述

差异

--- a/cammy.txt
+++ b/cammy.txt
@@ -14,17 +14,17 @@ Let:
1414 Our combinators, given with categorical datatypes, are:
1515
1616 id : X → X
17-Given f : X → Y and g : Y → W, comp(f, g) : X → W
17+Given f : X → Y and g : Y → W, (comp f g) : X → W
1818
1919 ignore : X → 1 (*)
2020
2121 fst : X × Y → X (*)
2222 snd : X × Y → Y (*)
23-Given f : X → Y and g : X → W, pair(f, g) : X → Y × W
23+Given f : X → Y and g : X → W, (pair f g) : X → Y × W
2424
2525 left : X → X + Y
2626 right : Y → X + Y
27-Given f : X → W and g : Y → W, case(f, g): X + Y → W
27+Given f : X → W and g : Y → W, (case f g): X + Y → W
2828
2929 assl : X × (Y × W) → (X × Y) × W
3030 assr : (X × Y) × W → X × (Y × W)
@@ -33,10 +33,10 @@ swap : X × Y → Y × X
3333
3434 dup = pair(id, id) : X → X × X
3535
36-Given f : X × Y → W, curry(f) : X → [Y, W]
37-Given f : X → [Y, W], uncurry(f) : X × Y → W
36+Given f : X × Y → W, (curry f) : X → [Y, W]
37+Given f : X → [Y, W], (uncurry f) : X × Y → W
3838 app = uncurry(id) : [X, Y] × X → Y
39-Given f : X → Y, name(f) = curry(comp(snd, f)) : 1 → [X, Y]
39+Given f : X → Y, (name f) = (curry (comp snd f)) : 1 → [X, Y]
4040
4141 t : 1 → Ω
4242 f : 1 → Ω
@@ -46,12 +46,12 @@ disj : Ω × Ω → Ω
4646
4747 zero : 1 → N
4848 succ : N → N
49-Given x : 1 → X and f : X → X, pr(x, f) : N → X
49+Given x : 1 → X and f : X → X, (pr x f) : N → X
5050
5151 nil : 1 → [X]
5252 cons : X × [X] → [X]
53-Given x : 1 → Y and f : X × Y → Y, fold(x, f) : [X] → Y
54-Given f : X → Y, map(f) = fold(nil, comp(pair(comp(fst, f), snd), cons)) : [X] → [Y]
53+Given x : 1 → Y and f : X × Y → Y, (fold x f) : [X] → Y
54+Given f : X → Y, (map f) = (fold nil (comp (pair (comp fst f) snd) cons)) : [X] → [Y]
5555
5656 Combinators with (*) are provided by OCaml by default; the others are in a
5757 stub module. Type-checking is achieved by copying the combinators into
--- a/shell.nix
+++ b/shell.nix
@@ -14,5 +14,7 @@ in pkgs.stdenv.mkDerivation {
1414 ocamlPackages.utop
1515 # running compile.sh
1616 ocaml
17+ # publishing
18+ mktorrent
1719 ];
1820 }
--- a/todo.txt
+++ b/todo.txt
@@ -3,3 +3,5 @@
33 * list/tail : [X] → [X]
44 * list/unfold : [Y, X × Y + 1] → [Y, [X]]
55 * rat
6+* jelly: zero (pr ...), succ (pr ...), nil (fold ...), cons (fold ...) can all
7+ be unrolled one step, allowing for loops to be inlined