(Arne Babenhauserheide)
2015-06-23: srfi: use the factorial example in the abstract. srfi: use the factorial example in the abstract.
diff --git a/docs/srfi-from-template.html b/docs/srfi-from-template.html --- a/docs/srfi-from-template.html +++ b/docs/srfi-from-template.html @@ -63,19 +63,30 @@ It resolves a limitation of <a href="htt Wisp expressions can include any s-expressions and as such provide backwards compatibility. </p> +<blockquote> <table><tr><th>wisp</th><th>s-exp</th></tr><tr><td> -<pre><b>define</b> : <i>hello</i> who - <i>format</i> #t "Hello ~A!\n" - . who -<i>hello</i> "Wisp" +<pre> +<b>define</b> : <i>factorial</i> n +__ <b>if</b> : <i>zero?</i> n +____ . 1 +____ <i>*</i> n : <i>factorial</i> (- n 1) + +<i>display</i> : <i>factorial</i> 5 +<i>newline</i> </pre> +</blockqote> </td><td> -<pre>(<b>define</b> (<i>hello</i> who) - (<i>format</i> #t "Hello ~A!\n" - who)) -(<i>hello</i> "S-exp") +<pre> +(<b>define</b> (<i>factorial</i> n) + (<b>if</b> (<i>zero?</i> n) + 1 + (<i>*</i> n (<i>factorial</i> (- n 1))))) + +(<i>display</i> (<i>factorial</i> 5)) +(<i>newline</i>) </pre> </td></tr></table> +</blockquote> <H1>Rationale</H1> @@ -130,7 +141,7 @@ Wisp expressions can include any s-expre <h2>Wisp example</h2> -Since an example speaks more than a hundred explanations, the following shows wisp exploiting all its features - including curly-infix from <a href="http://srfi.schemers.org/srfi-105/srfi-105.html">SRFI 105</a>: +Since an example speaks more than a hundred explanations, the following shows wisp exploiting all its features - including compatibility with curly-infix from <a href="http://srfi.schemers.org/srfi-105/srfi-105.html">SRFI 105</a>: <blockquote> <pre>