Skip to content

Instantly share code, notes, and snippets.

@404pnf
Forked from thatrubylove/lispy-ruby-example-1.rb
Created June 18, 2014 00:23
# treating a function as data
putter = ->(message) { puts message }
def deliver_message(message, handler)
handler.(message)
end
deliver_message("Hello, code as data!", putter)
# => Hello, code as data!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment