[DRE-commits] [ruby-org] 112/303: Added a clojure example to the export.
Jérémy Bobbio
lunar at alioth.debian.org
Fri Aug 9 17:33:39 UTC 2013
This is an automated email from the git hooks/post-receive script.
lunar pushed a commit to branch master
in repository ruby-org.
commit ccf63b697f1cd28bb61594d3ea90e86f2dffa9d2
Author: Brian Dewey <bdewey at gmail.com>
Date: Sun Sep 4 08:00:01 2011 -0700
Added a clojure example to the export.
---
spec/html_examples/advanced-code.html | 10 ++++++++++
spec/html_examples/advanced-code.org | 11 +++++++++++
2 files changed, 21 insertions(+)
diff --git a/spec/html_examples/advanced-code.html b/spec/html_examples/advanced-code.html
index fd31a9c..139979b 100644
--- a/spec/html_examples/advanced-code.html
+++ b/spec/html_examples/advanced-code.html
@@ -44,3 +44,13 @@ END:
end
end
</pre>
+<pre class="src">
+(def fib-seq
+ (concat
+ [0 1]
+ ((fn rfib [a b]
+ (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
+
+user> (take 20 fib-seq)
+(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)
+</pre>
diff --git a/spec/html_examples/advanced-code.org b/spec/html_examples/advanced-code.org
index 3dc8822..9f4c51d 100644
--- a/spec/html_examples/advanced-code.org
+++ b/spec/html_examples/advanced-code.org
@@ -64,3 +64,14 @@ Now let's test case-insensitive code blocks.
end
#+end_src
+#+begin_src clojure
+(def fib-seq
+ (concat
+ [0 1]
+ ((fn rfib [a b]
+ (lazy-cons (+ a b) (rfib b (+ a b)))) 0 1)))
+
+user> (take 20 fib-seq)
+(0 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 1597 2584 4181)
+#+end_src
+
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/ruby-org.git
More information about the Pkg-ruby-extras-commits
mailing list