On  8 Jun, Paul Hudak wrote:
>  show x should be a string that when printed looks like the value that
>  you would have to type to generate it directly.  This example is most
>  instructive:

[...]

and this is just cute:

main = putStr (quine q)
quine s = s ++ show s
q = "main = putStr (quine q)\nquine s = s ++ show s\nq = "

-- 
Jón Fairbairn                                 [EMAIL PROTECTED]
18 Kimberley Road                                        [EMAIL PROTECTED]
Cambridge CB4 1HH                      +44 1223 570179 (pm only, please)




Reply via email to