Skip to content

Instantly share code, notes, and snippets.

@JakubOboza
Created April 21, 2011 11:17
Show Gist options
  • Save JakubOboza/934210 to your computer and use it in GitHub Desktop.
Save JakubOboza/934210 to your computer and use it in GitHub Desktop.
let capCount = length . filter (isUpper . head) . words
-- "." is compose , compose f g x = compose f (g x)
-- "." works like this f . g -> f (g )
-- creates composition of functions, new function
-- above sample explained
c1 = compose isUpper head
c2 = compose filter(c1) words
c3 = compose length c2
let capCountNoDots = compose length (compose (filter (compose isUpper head)) words)
-- Compose with carry of input val.
-- Ku*wa!!!!!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment