4fun plus(x, y) = case x of {
6 | S(k) => S (plus(k, y))
9fun natToInt(x) = case x of {
11 | S(k) => let y = natToInt(k) in y + 1
14fun adder(arity, acc) = case arity of {
16 | S(k) => adderAux(k, acc)
19fun adderAux(k, acc, n) = adder(k, plus(acc, n))
28fun main() = %WriteInt(natToInt(adder(three, two, three, four, five)))
keysesc to close
- j k
- move down, up
- enter
- open
- esc
- back, or up a level
- 1 2 3 4
- readme, files, commits, refs
- /
- filter
- y
- copy the clone command
- c
- compare the chosen commit with another (or shift-click both)
- ?
- show or hide this list