Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- switch ( x ){
- case 0:
- do_something();
- case 1:
- do_something();
- case 2:
- do_something();
- }
- switch ( x, y ){
- case Zero, Zero:
- return Zero;
- case Zero, Succ(n):
- return n;
- case Succ(n), Zero:
- return n;
- case Succ(n), Succ(m):
- return Succ(Succ(add(n, m)));
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement