Skip to content

Instantly share code, notes, and snippets.

@qoelet
Created August 14, 2013 09:18
Show Gist options
  • Save qoelet/6229319 to your computer and use it in GitHub Desktop.
Save qoelet/6229319 to your computer and use it in GitHub Desktop.
let q s = putStrLn (s ++ show s) in q "let q s = putStrLn (s ++ show s) in q "
-- s is mapped to string "let q s = putStrLn (s ++ show s) in q "
-- q is mapped to expr putStrLn (s ++ show s)
-- show s produces a string with quotes escaped
-- e.g. show "hello" produces "\"hello\""
-- 'in q' above seems to cause the expression to be evaluated
-- e.g.
-- Prelude> let x = 1 + 2
-- Prelude> let x = 1 + 2 in x
-- 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment