@@ -46,9 +46,6 @@ twoThree = cell two three
4646sigOne :: Noun
4747sigOne = cell sig one
4848
49−sigThree :: Noun
50−sigThree = cell sig three
51−
5249annotation :: RawNoun ann -> ann
5350annotation (Atom _ ann) = ann
5451annotation (Cell _ _ ann) = ann
@@ -99,13 +96,13 @@ fas lhs rhs =
9996 else fas 3 (fas d rhs)
10097 _ -> undefined
10198
102−hax :: Natural -> Noun -> Noun
103−hax n ~(Cell b c _) =
99+hax :: Natural -> Noun -> Noun -> Noun
100+hax n b c =
104101 let (a, m) = divMod n 2
105102 in case n of
106103 1 -> b
107− _ | m == 0 -> hax a (cell (cell b (fas (a + a + 1) c)) c)
108− _ -> hax a (cell (cell (fas (a + a) c) b) c)
104+ _ | m == 0 -> hax a (cell b (fas (a + a + 1) c)) c
105+ _ -> hax a (cell (fas (a + a) c) b) c
109106
110107tar :: Noun -> Noun
111108tar ~(Cell subject ~(Cell a b _) _) = tar' a b subject
@@ -136,7 +133,7 @@ tar' b c subject = case b of
136133 6 -> case tar' sig (tar' sig (tar' four (cell four x) subject) twoThree) (cell h j) of
137134 ~(Cell u v _) -> tar' u v subject
138135 10 -> case x of
139− ~(Cell ~(Atom b' _) ~(Cell u v _) _) -> hax b' $ cell (tar' u v subject) $ tar' h j subject
136+ ~(Cell ~(Atom b' _) ~(Cell u v _) _) -> hax b' (tar' u v subject) (tar' h j subject)
140137 11 -> case x of
141138 Cell _ ~(Cell u v _) _ -> tar' sig three (cell (tar' u v subject) (tar' h j subject))
142139 Atom _ _ -> tar' h j subject