module List.Basic where
import Bool
import Prelude ( (), Num, Int, Bool )
infixr 5 ++
(++) :: [a] -> [a] -> [a] ;
(x:xs) ++ ys = x : (xs ++ ys) ;
[] ++ ys = ys ;
concat :: [[a]] -> [a] ;
concat (x:xs) = x ++ concat xs ;
concat [] = [] ;
take :: Int -> [a] -> [a] ;
take 0 _xs = [] ;
take n (x:xs) = x : take (n1) xs ;
take _ [] = [] ;
filter :: (a -> Bool) -> [a] -> [a] ;
filter p (x:xs) = ifThenElse (p x) (x : filter p xs) (filter p xs) ;
filter _ [] = [] ;
takeWhile :: (a -> Bool) -> [a] -> [a] ;
takeWhile p (x:xs) = ifThenElse (p x) (x : takeWhile p xs) [] ;
takeWhile _ [] = [] ;