From 9437f47ff703c10fdaef356d19e7b867dfabaf67 Mon Sep 17 00:00:00 2001 From: pingu Date: Fri, 1 Mar 2024 11:22:15 +0100 Subject: [PATCH] =?UTF-8?q?=CE=B7=20reduce?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/GoodList.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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