on master help sign in
Fix take/drop
9489bb0Edwin Brady
lib/prelude/list.idr+2−2
@@ -78,12 +78,12 @@ init' (x::xs) =
78--------------------------------------------------------------------------------
78--------------------------------------------------------------------------------
79
79
80take : Nat -> List a -> List a
80take : Nat -> List a -> List a
81−take Z xs = []
81+take O xs = []
82take (S n) [] = []
82take (S n) [] = []
83take (S n) (x::xs) = x :: take n xs
83take (S n) (x::xs) = x :: take n xs
84
84
85drop : Nat -> List a -> List a
85drop : Nat -> List a -> List a
86−drop Z xs = xs
86+drop O xs = xs
87drop (S n) [] = []
87drop (S n) [] = []
88drop (S n) (x::xs) = drop n xs
88drop (S n) (x::xs) = drop n xs
89
89