η reduce
This commit is contained in:
parent
ca0fea108f
commit
9437f47ff7
@ -53,9 +53,9 @@ snoc (Singleton a) = Multiple a Empty
|
|||||||
snoc (Multiple a b c) = Multiple a (b `snoc` c)
|
snoc (Multiple a b c) = Multiple a (b `snoc` c)
|
||||||
|
|
||||||
append :: GoodList a -> GoodList a -> GoodList a
|
append :: GoodList a -> GoodList a -> GoodList a
|
||||||
append Empty ys = ys
|
append Empty = id
|
||||||
append (Singleton x) ys = cons x ys
|
append (Singleton x) = cons x
|
||||||
append (Multiple a b c) ys = cons a . append b $ cons c ys
|
append (Multiple a b c) = cons a . append b . cons c
|
||||||
|
|
||||||
join :: GoodList (GoodList a) -> GoodList a
|
join :: GoodList (GoodList a) -> GoodList a
|
||||||
join Empty = Empty
|
join Empty = Empty
|
||||||
|
Loading…
Reference in New Issue
Block a user