@@ -109,13 +109,19 @@ length [] = 0
109length (x::xs) = 1 + length xs
109length (x::xs) = 1 + length xs
111--------------------------------------------------------------------------------
111--------------------------------------------------------------------------------
112−-- Building bigger lists
112+-- Building (bigger) lists
113--------------------------------------------------------------------------------
113--------------------------------------------------------------------------------
115(++) : List a -> List a -> List a
115(++) : List a -> List a -> List a
116(++) [] right = right
116(++) [] right = right
117(++) (x::xs) right = x :: (xs ++ right)
117(++) (x::xs) right = x :: (xs ++ right)
120+repeat x = x :: repeat x
122+replicate : Nat -> a -> List a
123+replicate n x = take n (repeat x)
119--------------------------------------------------------------------------------
125--------------------------------------------------------------------------------
120-- Instances
126-- Instances
121--------------------------------------------------------------------------------
127--------------------------------------------------------------------------------