Skip to content

Instantly share code, notes, and snippets.

@mrdomino
Last active September 20, 2023 15:04
Show Gist options
  • Save mrdomino/4957479 to your computer and use it in GitHub Desktop.
Save mrdomino/4957479 to your computer and use it in GitHub Desktop.
It’s a quine, almost.
t [] = []
t (c:[]) = []
t (c:cs) = c:t cs
g s = s ++ " and growing."
main = do
putStr s
print s
putStrLn $"m = (g.t)\n\n\n\n " ++ show m
s = "t [] = []\nt (c:[]) = []\nt (c:cs) = c:t cs\ng s = s ++ \" and growing.\"\nmain = do\n putStr s\n print s\n putStrLn $\"m = (g.t)\\n\\n\\n\\n \" ++ show m\ns = "
m = (g.t)
"My love for you keeps growing."
#!/bin/bash
function runq() {
runhaskell $1 | tee $2 | tail -n1
}
function go() {
a=$1
b=$(($a+1))
runq valenquine$a.hs valenquine$b.hs
sleep 1
go $b
}
function clean() {
rm valenquine?*.hs
}
trap clean EXIT
go
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment