on master help sign in
Fix take/drop
commit9489bb040d6f7d5e20fdb5c12142ac9a30e5560f authorEdwin Brady <eb@cs.st-andrews.ac.uk> dateThu 16 Feb 2012, 11:39 (15 years ago) parentbbb978b
1 file changed+2−2
lib/prelude/list.idr+2−2
lib/prelude/list.idr+2−2
@@ -78,12 +78,12 @@ init' (x::xs) =
7878--------------------------------------------------------------------------------
7979
8080take : Nat -> List a -> List a
81−take Z xs = []
81+take O xs = []
8282take (S n) [] = []
8383take (S n) (x::xs) = x :: take n xs
8484
8585drop : Nat -> List a -> List a
86−drop Z xs = xs
86+drop O xs = xs
8787drop (S n) [] = []
8888drop (S n) (x::xs) = drop n xs
8989