diff options
Diffstat (limited to 'archive/2.vm/static-dispatch.mu')
-rw-r--r-- | archive/2.vm/static-dispatch.mu | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/archive/2.vm/static-dispatch.mu b/archive/2.vm/static-dispatch.mu deleted file mode 100644 index a0157d13..00000000 --- a/archive/2.vm/static-dispatch.mu +++ /dev/null @@ -1,29 +0,0 @@ -# Example program showing how multiple functions with the same name can -# coexist, and how we select between them. -# -# Expected output: -# 4 -# 7 -# 7 - -def test a:num -> b:num [ - local-scope - load-inputs - b <- add a, 1 -] - -def test a:num, b:num -> c:num [ - local-scope - load-inputs - c <- add a, b -] - -def main [ - local-scope - a:num <- test 3 # selects single-input version - $print a, 10/newline - b:num <- test 3, 4 # selects double-input version - $print b, 10/newline - c:num <- test 3, 4, 5 # prefers double- to single-input version - $print c, 10/newline -] |