(def test-example-f (foo)

; more than just foo
(+ 2 foo))

(examples-for test-example-f

("adds two to 99"
 (test-example-f 99)
 101)

("adds two and two"
 (test-example-f 2)
 4))

;; do this again to try confuse helpful/examples (examples-for test-example-f

("adds two to 45"
 (test-example-f 45)
 47)

("adds two and seven"
 (test-example-f 7)
 9))

(examples-for help

("describes its argument when it's a number"
 help:22
 "<pre class='helpful'>22 : is a number\n\n</pre>")

("describes its argument when it's a string"
 (help "hello world")
 "<pre class='helpful'>\"hello world\" : is a string\n\n</pre>")

("describes its argument when it's a hash"
 (let paris { a 1 b 2 c { x 9 y 8 z 7 } }
   (help paris))
 "<pre class='helpful'>paris : is a hash<div class='keyhelp'><div class='key'>a</div>-&gt;<div class='keyvalue'>number</div></div><div class='keyhelp'><div class='key'>b</div>-&gt;<div class='keyvalue'>number</div></div><div class='keyhelp'><div class='key'>c</div>-&gt;<div class='keyvalue'>hash</div></div>

</pre>“)

("returns dox and examples for the given name"
 help:test-example-f
 "<pre class='helpful'>Function : test-example-f

args : (foo)

more than just foo

source

(def test-example-f (foo) (+ 2 foo))

<div class='helpful-examples'><h2>Examples for <span class='example-name'>test-example-f</span></h2><pre class='helpful-example'>test-example-f adds two to 45

example :

(test-example-f 45)

returns : 47


</pre><pre class='helpful-example'>test-example-f adds two and seven

example :

(test-example-f 7)

returns : 9


</pre><pre class='helpful-example'>test-example-f adds two to 99

example :

(test-example-f 99)

returns : 101


</pre><pre class='helpful-example'>test-example-f adds two and two

example :

(test-example-f 2)

returns : 4


</pre></div></pre>“))