Skip to content

Commit

Permalink
Update snippet
Browse files Browse the repository at this point in the history
  • Loading branch information
BNAndras authored Jun 28, 2024
1 parent e6dc693 commit 1f772b7
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions docs/SNIPPET.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
fun hello(name):
"Hello, " + name + "!"
fun sum(lst):
cases (List) lst:
| empty => 0
| link(first, rest) => first + sum(rest)
end
where:
sum([list: ]) is 0
sum([list: 1, 2, 3]) is 6
end

0 comments on commit 1f772b7

Please sign in to comment.