Commit 82e4b5df authored by Pietro Abate's avatar Pietro Abate

[r2004-04-13 11:09:00 by afrisch] Empty log message

Original author: afrisch
Date: 2004-04-13 11:09:00+00:00
parent dc689379
......@@ -54,6 +54,15 @@ some special regular expressions.
</box>
<box title="CDuce quine" link="quine">
<p>
A quine (a.k.a. self-rep) is a program that produces its own source
code. Here is an example of a quine written in CDuce.
</p>
<sample highlight="false">
<include-verbatim file="quine.cd"/>
</sample>
</box>
<box title="The script that generates this site" link="site">
<p>
......
let data = "
print ['let data = ##' !data '## in'];
let fun f (Latin1 -> Latin1)
| [ '#' '#'; s ] -> [ '##'; f s ]
| [ c; s ] -> [ c; f s ]
| [] -> [] in
print (f data)
" in
print ['let data = "' !data '" in'];
let fun f (Latin1 -> Latin1)
| [ '#' '#'; s ] -> [ '"'; f s ]
| [ c; s ] -> [ c; f s ]
| [] -> [] in
print (f data)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment