Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- module Codewars.Kata.Which where
- import Data.List
- -- Sorry for the name of the function.
- inArray :: [String] -> [String] -> [String]
- inArray a1 a2 = nub $ sort $ foldr go [] a2 where
- go word acc = acc ++ filter (\s -> isInfixOf s word) a1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement