diff --git a/src/GoodList.hs b/src/GoodList.hs index 37b50d9..b806f91 100644 --- a/src/GoodList.hs +++ b/src/GoodList.hs @@ -53,9 +53,9 @@ snoc (Singleton a) = Multiple a Empty snoc (Multiple a b c) = Multiple a (b `snoc` c) append :: GoodList a -> GoodList a -> GoodList a -append Empty ys = ys -append (Singleton x) ys = cons x ys -append (Multiple a b c) ys = cons a . append b $ cons c ys +append Empty = id +append (Singleton x) = cons x +append (Multiple a b c) = cons a . append b . cons c join :: GoodList (GoodList a) -> GoodList a join Empty = Empty