diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2016-09-18 09:06:34 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2016-09-18 09:09:00 -0700 |
commit | 4de96970f192bc2226250e52d1366e985db90ab5 (patch) | |
tree | 652073f7f234990d954724b0e896a92f75e51595 /static-dispatch.mu | |
parent | 51ae6e61e2d14354e66b95cc028b8d1ebddfdc74 (diff) | |
download | mu-4de96970f192bc2226250e52d1366e985db90ab5.tar.gz |
3400
Undo commit 3340. Let's standardize names of non-core files to only have dashes. That's also consistent with the edit/ and sandbox/ apps. Mu programmers will tend to pervasively use dashes, just like Lisp programmers. Scripts will continue to use underscores..
Diffstat (limited to 'static-dispatch.mu')
-rw-r--r-- | static-dispatch.mu | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/static-dispatch.mu b/static-dispatch.mu new file mode 100644 index 00000000..7aec6fa1 --- /dev/null +++ b/static-dispatch.mu @@ -0,0 +1,21 @@ +def test a:num -> b:num [ + local-scope + load-ingredients + b <- add a, 1 +] + +def test a:num, b:num -> c:num [ + local-scope + load-ingredients + c <- add a, b +] + +def main [ + local-scope + a:num <- test 3 # selects single-ingredient version + $print a, 10/newline + b:num <- test 3, 4 # selects double-ingredient version + $print b, 10/newline + c:num <- test 3, 4, 5 # prefers double- to single-ingredient version + $print c, 10/newline +] |