Extra 1 - dropWhile

dropWhile : (a -> Bool) -> List a -> List a
dropWhile predicate list =
    case list of
      []      -> []

      x::xs   -> 
          if (predicate x) then 
              dropWhile predicate xs
          else 
              list

Back to problem

results matching ""

    No results matching ""