Skip to content

Instantly share code, notes, and snippets.

@crufter
Created November 7, 2013 16:22
Show Gist options
  • Save crufter/7357370 to your computer and use it in GitHub Desktop.
Save crufter/7357370 to your computer and use it in GitHub Desktop.
Haskell stuff
import Data.List
import Data.List.Split
isEven x = rem x 2 == 0
isLong x = length x > 2
ftext xs = filter isLong . concat . map tails $ splitOn " " xs
doubleChars cs = concat $ map (\c->[c,c]) cs
-- map (*2) [1..10]
contains wordList text = or $ map (flip isInfixOf text) wordList
-- let (passed, failed) = partition (>60) [49, 58, 76, 82, 88, 90]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment