$ ruby -e 'puts "Hello"' Hello
$ echo 'main = putStrLn "Hello"' > main.hs $ ghc -o main main.hs $ ./main Hello
def current_user User.find(session[:user_id]) || Guest.new end
detect :: (a -> Bool) -> [a] -> Maybe a detect = -- ...
-- I never said what table to select from users <- runDB $ selectList [] [] -- but because `userName` can only operate on Users, the -- system will *infer* that I wanted Users map userName users
Construct programs as a composition of Objects
p = Person.new("Pat", 28) p.age # => 28 p.grow p.age # => 29
the new hotness
Construct programs as a composition of Functions
let p = Person "Pat" 28 p' = grow p in (age p, age p') -- => (28, 29)