• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-cqtcocoa誰得pythonphprubygameguibathyscaphec翻訳計画中(planning stage)omegatframeworktwittertestdomvb.netdirectxbtronarduinopreviewerゲームエンジン

A categorical programming language


Commit MetaInfo

修订版9b941f62dfd09a62d6f48d9cceab9869ba844f3b (tree)
时间2022-01-09 14:32:00
作者Corbin <cds@corb...>
CommiterCorbin

Log Message

Add several monads and comonads.

更改概述

差异

--- /dev/null
+++ b/hive/comonads/product/counit.cammy
@@ -0,0 +1 @@
1+snd
--- /dev/null
+++ b/hive/comonads/product/duplicate.cammy
@@ -0,0 +1 @@
1+(pair fst id)
--- /dev/null
+++ b/hive/comonads/store/counit.cammy
@@ -0,0 +1 @@
1+fun/app
--- /dev/null
+++ b/hive/monads/either/join.cammy
@@ -0,0 +1 @@
1+(case left id)
--- /dev/null
+++ b/hive/monads/either/unit.cammy
@@ -0,0 +1 @@
1+right
--- /dev/null
+++ b/hive/monads/list/unit.cammy
@@ -0,0 +1 @@
1+(comp (pair id (fun/const nil)) cons)
--- /dev/null
+++ b/hive/monads/searchable/unit.cammy
@@ -0,0 +1 @@
1+(curry fst)
--- a/todo.txt
+++ b/todo.txt
@@ -1,3 +1,22 @@
1+* Literate Cammy
2+ * RPython modules will go in rpy/rcammy/
3+ * RPython entrypoints will go in rpy/
4+ * Write filterSource expressions to grab only one entrypoint + modules
5+ * Nix expressions also go in rpy/ next to entrypoints
6+ * Entrypoints:
7+ * cammy-weave $HIVE: document a hive
8+ * cammy-tangle $HIVE: take an expression on stdin, return framed optimized
9+ expression on stdout
10+ * cammy-frame $HIVE | jelly
11+ * cammy-draw ...: take an expression and canvas params, make a PNG
12+ * cammy-frame $HIVE: take an expression on stdin, return framed expression
13+ on stdout
14+* Other entrypoints
15+ * Split and cleanup movelist
16+ * cammy-typecheck: take an expression on stdin, print its type
17+ * cammy-djinn: take a closed type, return expression with that type on
18+ stdout
19+
120 * list/eq : [X × X, 2] → [[X] × [X], 2]
221 * list/zip : [X] × [Y] → [X × Y]
322 * list/tail : [X] → [X]
@@ -9,6 +28,7 @@
928 * Typechecker errors are inscrutable
1029 * Trigonometric functions
1130 * f-atan2 added, need f-sin and f-cos?
31+ * Optimizations for odd/even functions?
1232 * Transcendental and other constants
1333 * Euler's constant e
1434 * Euler's constant gamma