|
50 | 50 | (\ f x . f (x x)) |
51 | 51 |
|
52 | 52 | # Unbound |
53 | | -someFunc = \ local . true nonexistant local |
| 53 | +some-func = \ local . true non-existant local |
54 | 54 |
|
55 | 55 | # Out of scope args |
56 | | -otherFunc = \ x . const (\ scopedArg . x ()) scopedArg x |
| 56 | +other-func = \ x . const (\ scoped-arg . x ()) scoped-arg x |
57 | 57 |
|
58 | 58 | # Debug mode on |
59 | 59 | #debug |
|
62 | 62 | (\ f x . f (x x)) |
63 | 63 |
|
64 | 64 | # Unbound - Debug |
65 | | -someFunc = \ local . true nonexistant local |
| 65 | +some-func = \ local . true non-existant local |
66 | 66 |
|
67 | 67 | # Out of scope args - Debug |
68 | | -otherFunc = \ x . const (\ scopedArg . x ()) scopedArg x |
| 68 | +other-func = \ x . const (\ scoped-arg . x ()) scoped-arg x |
69 | 69 |
|
70 | 70 | # Debug mode off |
71 | 71 | #debug |
72 | 72 |
|
73 | 73 | # More code |
74 | 74 | zero = false |
75 | 75 | succ = \ n f x . f (n f x) |
76 | | -isZ = \ n . n (const false) true |
| 76 | +is-z = \ n . n (const false) true |
77 | 77 | add = \ a b f x . a f (b f x) |
78 | 78 | mul = \ a b f . a (b f) |
79 | 79 | three = succ (succ (succ zero)) |
|
96 | 96 | map = \ f xs . null xs nil (cons (f (head xs)) (map f (tail xs))) |
97 | 97 | sum = foldr add zero |
98 | 98 | drop = \ n . n tail |
99 | | -take = \ n xs . isZ n nil (cons (head xs) (take (pred n) (tail xs))) |
| 99 | +take = \ n xs . is-z n nil (cons (head xs) (take (pred n) (tail xs))) |
100 | 100 | col = \ n xs . head (drop n xs) |
101 | 101 | colS = \ n xs . cons (col n xs) (cons (col (succ n) xs) (cons (col (succ (succ n)) xs) (nil))) |
102 | 102 | row = \ n xs . map (col n) xs |
103 | | -rowS = \ n xs . cons (row n xs) (cons (row (succ n) xs) (cons (row (succ (succ n)) xs) (nil))) |
104 | | -chunk = \ a b xs . rowS a (colS b xs) |
| 103 | +row-s = \ n xs . cons (row n xs) (cons (row (succ n) xs) (cons (row (succ (succ n)) xs) (nil))) |
| 104 | +chunk = \ a b xs . row-s a (colS b xs) |
105 | 105 | append = \ as bs . null as bs (cons (head as) (append (tail as) bs)) |
106 | 106 | concat = foldr append nil |
107 | | -eq = \ a b . isZ a (isZ b) (isZ b false (eq (pred a) (pred b))) |
| 107 | +eq = \ a b . is-z a (is-z b) (is-z b false (eq (pred a) (pred b))) |
108 | 108 | all = foldr (\ a b . a b false) true |
109 | 109 | allf = \ f xs . all (map f xs) |
110 | 110 | </textarea> |
|
0 commit comments