@@ -8,16 +8,16 @@
9++ head |= p=[A B]
9++ head |= p=[A B]
13++ tail |= p=[A B]
13++ tail |= p=[A B]
17++ not |= b=?
17++ not |= b=?
22++ eq |= args=[A A] (eq-data.internal args)
22++ eq |= args=[A A] (eq-data.internal args)
@@ -31,31 +31,29 @@
32++ fall |= args=[(unit A) A]
32++ fall |= args=[(unit A) A]
34− [maybe fallback]
34+ [maybe fallback]
36− ~ fallback
36+ ~ fallback
37− [~ value] value
37+ [~ value] value
39++ need |= maybe=(unit A)
39++ need |= maybe=(unit A)
42− [~ value] value
42+ [~ value] value
44++ weld |= args=[(list A) (list A)]
44++ weld |= args=[(list A) (list A)]
47− ^- (list A)
46+ [xs ys] ^- (list A)
50− [item rest] [item (weld rest ys)]
49+ [item rest] [item (weld rest ys)]
52++ turn |= args=[(list A) $-(A B)]
51++ turn |= args=[(list A) $-(A B)]
55− ^- (list B)
53+ [xs f] ^- (list B)
58− [item rest] [(f item) (turn rest f)]
56+ [item rest] [(f item) (turn rest f)]
60+$ dime [p=@ta q=@]
58+$ dime [p=@ta q=@]
@@ -104,17 +102,16 @@
104+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
102+$ like |$ [A] [p=hair q=(unit [p=A q=nail])]
106++ like |= [f=$-(A B) result=(like A)]
104++ like |= [f=$-(A B) result=(like A)]
108− ^- (unit [p=B q=nail])
105+ ++ mapped ^- (unit [p=B q=nail])
109− ?- q.result
106+ ?- q.result
111− [~ value] `[p=(f p.value) q=q.value]
108+ [~ value] `[p=(f p.value) q=q.value]
112 ^- (like B) [p=p.result q=mapped]
109 ^- (like B) [p=p.result q=mapped]
114++ wonk |= veq=(like A)
111++ wonk |= veq=(like A)
117− [~ product] p.product
114+ [~ product] p.product
119+$ lone |$ [A] [p=A]
116+$ lone |$ [A] [p=A]
@@ -143,214 +140,209 @@
144++ snoc |= args=[(list A) A]
141++ snoc |= args=[(list A) A]
146− [xs item] (weld xs [item ~])
143+ [xs item] (weld xs [item ~])
148++ flop |= xs=(list A)
145++ flop |= xs=(list A)
149 ++ reverse-into |= args=[(list A) (list A)]
146 ++ reverse-into |= args=[(list A) (list A)]
151− [rest acc]
148+ [rest acc]
154− [item more] (reverse-into more [item acc])
151+ [item more] (reverse-into more [item acc])
155 (reverse-into xs ~)
152 (reverse-into xs ~)
157−++ drop |= maybe=(unit A)
154+++ drop |= maybe=(unit A) ^- (list A)
159− ?- maybe
155+ ?- maybe
161− [~ value] [value ~]
157+ [~ value] [value ~]
163++ bond |= fallback=$-(~ A)
159++ bond |= fallback=$-(~ A)
164 |= maybe=(unit A)
160 |= maybe=(unit A)
166− ~ (fallback ~)
162+ ~ (fallback ~)
167− [~ value] value
163+ [~ value] value
169++ bind |= args=[(unit A) $-(A B)]
165++ bind |= args=[(unit A) $-(A B)]
171− [maybe f] ^- (unit B)
167+ [maybe f] ^- (unit B)
172− ?- maybe
168+ ?- maybe
174− [~ value] `(f value)
170+ [~ value] `(f value)
176++ biff |= args=[(unit A) $-(A (unit B))]
172++ biff |= args=[(unit A) $-(A (unit B))]
178− [maybe f] ^- (unit B)
174+ [maybe f] ^- (unit B)
179− ?- maybe
175+ ?- maybe
181− [~ value] (f value)
177+ [~ value] (f value)
183++ both |= args=[(unit A) (unit B)]
179++ both |= args=[(unit A) (unit B)]
185− [first second] ^- (unit [A B])
181+ [first second] ^- (unit [A B])
186− ?- first
182+ ?- first
189− ?- second
185+ ?- second
191− [~ b] `[a b]
187+ [~ b] `[a b]
193++ clap |= args=[(unit A) (unit A) $-([A A] A)]
189++ clap |= args=[(unit A) (unit A) $-([A A] A)]
195− [first second combine] ^- (unit A)
191+ [first second combine] ^- (unit A)
196− ?- first
192+ ?- first
197− ~ second
193+ ~ second
199− ?- second
195+ ?- second
201− [~ b] `(combine a b)
197+ [~ b] `(combine a b)
203++ hunt |= args=[$-([A A] ?) (unit A) (unit A)]
199++ hunt |= args=[$-([A A] ?) (unit A) (unit A)]
205− [choose first second] ^- (unit A)
201+ [choose first second] ^- (unit A)
206− ?- first
202+ ?- first
207− ~ second
203+ ~ second
209− ?- second
205+ ?- second
212− ?- (choose a b)
208+ ?- (choose a b)
213− %.y first
209+ %.y first
214− %.n second
210+ %.n second
216++ mate |= args=[(unit A) (unit A)]
212++ mate |= args=[(unit A) (unit A)]
218− [first second] ^- (unit A)
214+ [first second] ^- (unit A)
219− ?- second
215+ ?- second
222− ?- first
218+ ?- first
223− ~ second
219+ ~ second
225− ?- (eq a b)
221+ ?- (eq a b)
226− %.y first
222+ %.y first
229++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
225++ clef |= args=[(unit A) (unit B) $-([A B] (unit C))]
231− [first second combine] ^- (unit C)
227+ [first second combine] ^- (unit C)
232− ?- first
228+ ?- first
235− ?- second
231+ ?- second
237− [~ b] (combine a b)
233+ [~ b] (combine a b)
239++ skim |= args=[(list A) $-(A ?)]
235++ skim |= args=[(list A) $-(A ?)]
241− [xs predicate] ^- (list A)
237+ [xs predicate] ^- (list A)
244− [item rest]
240+ [item rest]
245− ?- (predicate item)
241+ ?- (predicate item)
246− %.y [item (skim rest predicate)]
242+ %.y [item (skim rest predicate)]
247− %.n (skim rest predicate)
243+ %.n (skim rest predicate)
249++ skip |= args=[(list A) $-(A ?)]
245++ skip |= args=[(list A) $-(A ?)]
251− [xs predicate] ^- (list A)
247+ [xs predicate] ^- (list A)
254− [item rest]
250+ [item rest]
255− ?- (predicate item)
251+ ?- (predicate item)
256− %.y (skip rest predicate)
252+ %.y (skip rest predicate)
257− %.n [item (skip rest predicate)]
253+ %.n [item (skip rest predicate)]
259−++ levy |= args=[(list A) $-(A ?)]
255+++ levy |= args=[(list A) $-(A ?)] ^- ?
262− [xs predicate]
257+ [xs predicate]
265− [item rest]
260+ [item rest]
266− ?- (predicate item)
261+ ?- (predicate item)
267− %.y (levy rest predicate)
262+ %.y (levy rest predicate)
270−++ lien |= args=[(list A) $-(A ?)]
265+++ lien |= args=[(list A) $-(A ?)] ^- ?
273− [xs predicate]
267+ [xs predicate]
276− [item rest]
270+ [item rest]
277− ?- (predicate item)
271+ ?- (predicate item)
279− %.n (lien rest predicate)
273+ %.n (lien rest predicate)
281++ roll |= args=[(list A) B $-([A B] B)]
275++ roll |= args=[(list A) B $-([A B] B)]
283− [xs start combine]
277+ [xs start combine]
286− [item rest] (roll rest (combine item start) combine)
280+ [item rest] (roll rest (combine item start) combine)
288++ reel |= args=[(list A) B $-([A B] B)]
282++ reel |= args=[(list A) B $-([A B] B)]
290− [xs start combine]
284+ [xs start combine]
293− [item rest] (combine item (reel rest start combine))
287+ [item rest] (combine item (reel rest start combine))
295++ flit |= predicate=$-(A ?)
289++ flit |= predicate=$-(A ?)
296− |= value=A
290+ |= value=A ^- (unit A)
298− ?- (predicate value)
291+ ?- (predicate value)
299− %.y `value
292+ %.y `value
302++ murn |= args=[(list A) $-(A (unit B))]
295++ murn |= args=[(list A) $-(A (unit B))]
304− [xs f] ^- (list B)
297+ [xs f] ^- (list B)
307− [item rest]
300+ [item rest]
308− ?- (f item)
301+ ?- (f item)
309− ~ (murn rest f)
302+ ~ (murn rest f)
310− [~ value] [value (murn rest f)]
303+ [~ value] [value (murn rest f)]
312++ join |= args=[A (list A)]
305++ join |= args=[A (list A)]
314− [separator xs] ^- (list A)
320− [next more] [item [separator (join separator rest)]]
322−++ snip |= xs=(list A)
323− ^- (list A)
307+ [separator xs] ^- (list A)
326− [item rest]
313+ [next more] [item [separator (join separator rest)]]
315+++ snip |= xs=(list A) ^- (list A)
327− ?- rest
318+ [item rest]
329− [next more] [item (snip rest)]
321+ [next more] [item (snip rest)]
331++ rear |= xs=(list A)
323++ rear |= xs=(list A)
334− [item rest]
326+ [item rest]
337− [next more] (rear rest)
329+ [next more] (rear rest)
339++ cork |= gates=[$-(A B) $-(B C)]
331++ cork |= gates=[$-(A B) $-(B C)]
341− [f g] |= x=A (g (f x))
333+ [f g] |= x=A (g (f x))
343++ corl |= gates=[$-(B C) $-(A B)]
335++ corl |= gates=[$-(B C) $-(A B)]
345− [f g] |= x=A (f (g x))
337+ [f g] |= x=A (f (g x))
347++ cury |= args=[$-([A B] C) A]
339++ cury |= args=[$-([A B] C) A]
349− [f a] |= b=B (f a b)
341+ [f a] |= b=B (f a b)
351++ curr |= args=[$-([A B] C) B]
343++ curr |= args=[$-([A B] C) B]
353− [f b] |= a=A (f a b)
345+ [f b] |= a=A (f a b)
355+$ cmd |$ [M]
347+$ cmd |$ [M]
356 [%poke p=raw-poke reply=$-((unit @t) M)]
348 [%poke p=raw-poke reply=$-((unit @t) M)]
@@ -373,29 +365,27 @@
373 [%url reply=$-(path M)]
365 [%url reply=$-(path M)]
375:: Count a finite list with the source-backed addition gate.
367:: Count a finite list with the source-backed addition gate.
376−++ lent |= xs=(list A)
368+++ lent |= xs=(list A) ^- @ud
380− [item rest] (add 1 (lent rest))
371+ [item rest] (add 1 (lent rest))
382++ lth |= args=[A A]
373++ lth |= args=[A A]
384− [x y] (gth y x)
375+ [x y] (gth y x)
386++ gte |= args=[A A]
377++ gte |= args=[A A]
388− [x y] (not (gth y x))
379+ [x y] (not (gth y x))
390++ lte |= args=[A A]
381++ lte |= args=[A A]
392− [x y] (not (gth x y))
383+ [x y] (not (gth x y))
394−++ zing |= xss=(list (list A))
385+++ zing |= xss=(list (list A)) ^- (list A)
398− [xs rest] (weld xs (zing rest))
388+ [xs rest] (weld xs (zing rest))
400++ lead |= first=A |= second=B [first second]
390++ lead |= first=A |= second=B [first second]
401++ late |= second=B |= first=A [first second]
391++ late |= second=B |= first=A [first second]