on 6d45ede help sign in
54 lines 937 B history raw
1---
2navhome: /docs
3title: Hoon
4sort: 11
5---
7# Hoon
9```
10|= {sub/* fol/*}
11^- *
12?< ?=(@ fol)
13?: ?=(^ -.fol)
14 [$(fol -.fol) $(fol +.fol)]
15?+ fol
16 !!
17 {$0 b/@}
18 ?< =(0 b.fol)
19 ?: =(1 b.fol) sub
20 ?< ?=(@ sub)
21 =+ [now=(cap b.fol) lat=(mas b.fol)]
22 $(b.fol lat, sub ?:(=(2 now) -.sub +.sub))
23::
24 {$1 b/*}
25 b.fol
26::
27 {$2 b/{^ *}}
28 =+ ben=$(fol b.fol)
29 $(sub -.ben, fol +.ben)
30::
31 {$3 b/*}
32 =+ ben=$(fol b.fol)
33 .?(ben)
34::
35 {$4 b/*}
36 =+ ben=$(fol b.fol)
37 ?> ?=(@ ben)
38 +(ben)
39::
40 {$5 b/*}
41 =+ ben=$(fol b.fol)
42 ?> ?=(^ ben)
43 =(-.ben +.ben)
44::
45 {$6 b/* c/* d/*}
46 $(fol =>(fol [2 [0 1] 2 [1 c d] [1 0] 2 [1 2 3] [1 0] 4 4 b]))
47::
48 {$7 b/* c/*} $(fol =>(fol [2 b 1 c]))
49 {$8 b/* c/*} $(fol =>(fol [7 [[0 1] b] c]))
50 {$9 b/* c/*} $(fol =>(fol [7 c 0 b]))
51 {$10 @ c/*} $(fol c.fol)
52 {$10 {b/* c/*} d/*} =+($(fol c.fol) $(fol d.fol))
53==
54```