diff options
author | Nat Lasseter <Nat Lasseter user@4574.co.uk> | 2018-02-15 14:50:59 +0000 |
---|---|---|
committer | Nat Lasseter <Nat Lasseter user@4574.co.uk> | 2018-02-15 14:50:59 +0000 |
commit | bfed3dfba46a3f39389bdb529e021e266128df67 (patch) | |
tree | e624950a22a25c66b3ef83c9f2af99d6aac3e616 /test.pr |
Initial Commit
Diffstat (limited to 'test.pr')
-rw-r--r-- | test.pr | 37 |
1 files changed, 37 insertions, 0 deletions
@@ -0,0 +1,37 @@ +zerop(0) is + true +end +zerop(_) is + false +end + +fib(0) is + 1 +end +fib(1) is + 1 +end +fib(x) is + fib(x-1) + fib(x-2) +end + +add(x, y) is + x + y +end + +puts add(1, 2) +puts fib(5) + +putser(string) is + puts string +end +putser("foo") + +varity(_) is + puts "one thing" +end +varity(_, _) is + puts "two things" +end +varity(1) +varity(1,2) |