refactor examples to use print(x) instead of putstrln(itos(x))
This commit is contained in:
parent
dfbad82f26
commit
700c5be701
3 changed files with 3 additions and 3 deletions
|
@ -1,4 +1,4 @@
|
|||
factorial(0) -> 1.
|
||||
factorial(n) -> n * factorial(n - 1).
|
||||
|
||||
putstrln(itos(factorial(10))).
|
||||
print(factorial(10)).
|
|
@ -1,4 +1,4 @@
|
|||
sum([]) -> 0.
|
||||
sum(x::xs) -> 1 + sum(xs).
|
||||
|
||||
putstrln(itos(sum([1, 2, 3]))).
|
||||
print(sum([1, 2, 3])).
|
|
@ -1,4 +1,4 @@
|
|||
sum([]) -> 0.
|
||||
sum(x::xs) -> x + sum(xs).
|
||||
|
||||
putstrln(itos(sum([1, 2, 3]))).
|
||||
print(sum([1, 2, 3])).
|
Loading…
Add table
Reference in a new issue