aboutsummaryrefslogtreecommitdiff
path: root/test.pr
blob: 77dfb279213efa333d96a842650bd19b897e83e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
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)