aboutsummaryrefslogtreecommitdiff
path: root/readme.textile
diff options
context:
space:
mode:
Diffstat (limited to 'readme.textile')
-rw-r--r--readme.textile6
1 files changed, 4 insertions, 2 deletions
diff --git a/readme.textile b/readme.textile
index a5c25f2..b514d21 100644
--- a/readme.textile
+++ b/readme.textile
@@ -32,12 +32,14 @@ bc.. $ echo <<. >test.rb
require './patter'
include Patter
-fib = Fun.new
+fib = Fun.new(:fibonacci)
fib.when(0){1}
fib.when(1){1}
fib.when(Var) do |n|
- fib.call(n-1) + fib.call(n-2)
+ fibonacci.call(n-1) + fibonacci.call(n-2)
end
+
+puts fibonacci(10)
.
$ ruby test.rb