Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 6th, 2011  |  syntax: Haskell  |  size: 0.38 KB  |  views: 113  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
This paste has a previous version, view the difference. Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. sortL :: [String] -> [String]
  2. sortL l = map sort (map (filter (/= '#')) l)
  3.  
  4. comp :: [String] -> [String] -> [(String,String)]
  5. comp x y = filter (\(x,y) -> x==y) (zip x y)
  6.  
  7. firsts :: [String] -> [String] -> [String]
  8. firsts a b = map fst $ comp a b
  9.  
  10. transl :: [String] -> [String] -> [String]
  11. transl a b = map snd $ filter (==(map fst (comp (firsts a b) (map fst a)))) a   -- error
clone this paste RAW Paste Data