• R/O
  • HTTP
  • SSH
  • HTTPS

提交

标签
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

A categorical programming language


Commit MetaInfo

修订版dc332465541b5b6ab48bd455a900ca46f277d9a3 (tree)
时间2021-09-17 08:53:44
作者Corbin <cds@corb...>
CommiterCorbin

Log Message

Factor out list/filter.

This was the strongest motivating example of a user-defined non-nullary
functor, and I'm pleased to see that it works exactly as imagined.

更改概述

差异

--- a/hive/list/evens.cammy
+++ b/hive/list/evens.cammy
@@ -1,2 +1 @@
1-(comp list/range
2- (fold nil (comp (pair (comp fst nat/is_even) (pair cons snd)) pick)))
1+(comp list/range (list/filter nat/is_even))
--- /dev/null
+++ b/hive/list/filter.cammy
@@ -0,0 +1 @@
1+(fold nil (comp (pair (comp fst @0) (pair cons snd)) pick))