Advertisement
Guest User

Untitled

a guest
Oct 4th, 2015
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. oddEvenMap :: (a -> b) -> (a -> b) -> [a] -> [b]
  2.  
  3. oddEvenMap _ _ [] = []
  4. oddEvenMap f1 f2 (x : y : s) = f1 x: f2 y : oddEvenMap f1 f2 s
  5. oddEvenMap f1 f2 (x : s) = [f2 x]
  6.  
  7.  
  8. withoutAs :: String -> String
  9. withoutAs [] = []
  10. withoutAs (x : s) = if (x == 'A' || x == 'a') then withoutAs s else help x s where help :: Char -> String -> String
  11.                                                                                    help x s = x : withoutAs s
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement