Skip to content

Instantly share code, notes, and snippets.

@jgoosey
Last active August 12, 2020 17:22
Show Gist options
  • Star 5 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save jgoosey/5489619 to your computer and use it in GitHub Desktop.
Save jgoosey/5489619 to your computer and use it in GitHub Desktop.
Quine in Haskell, two implementations
--Haskell Quine
--Implementation 1
import Control.Monad
import Control.Monad.Instances
main = (putStr . ap (++) show)
"--Haskell Quine\n--Implementation 1\nimport Control.Monad\nimport Control.Monad.Instances\nmain = (putStr . ap (++) show) "
--Implementation 2
--main = putStrLn (s ++ show s) where s =
-- "--Haskell Quine\n--Implementation 2\nmain = putStrLn (s ++ show s) where s ="
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment