diff options
author | Kartik K. Agaram <vc@akkartik.com> | 2015-07-28 14:33:22 -0700 |
---|---|---|
committer | Kartik K. Agaram <vc@akkartik.com> | 2015-07-28 14:33:22 -0700 |
commit | bc6436927640603675e2e700007f53c5ab213869 (patch) | |
tree | e8f76a871ac4118223e03015f32e6bd687a7bd49 /counters.mu | |
parent | aa0888459fc2ca41b0ad6bef5bfa72223ca33945 (diff) | |
download | mu-bc6436927640603675e2e700007f53c5ab213869.tar.gz |
1868 - start using naked literals everywhere
First step to reducing typing burden. Next step: inferring types.
Diffstat (limited to 'counters.mu')
-rw-r--r-- | counters.mu | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/counters.mu b/counters.mu index 2d57943d..6428ff9b 100644 --- a/counters.mu +++ b/counters.mu @@ -2,7 +2,7 @@ # (spaces) recipe new-counter [ - default-space:address:array:location <- new location:type, 30:literal + default-space:address:array:location <- new location:type, 30 n:number <- next-ingredient reply default-space:address:array:location ] @@ -18,13 +18,13 @@ recipe increment-counter [ recipe main [ local-scope # counter A - a:address:array:location <- new-counter 34:literal + a:address:array:location <- new-counter 34 # counter B - b:address:array:location <- new-counter 23:literal + b:address:array:location <- new-counter 23 # increment both by 2 but in different ways - increment-counter a:address:array:location, 1:literal - b-value:number <- increment-counter b:address:array:location, 2:literal - a-value:number <- increment-counter a:address:array:location, 1:literal + increment-counter a:address:array:location, 1 + b-value:number <- increment-counter b:address:array:location, 2 + a-value:number <- increment-counter a:address:array:location, 1 # check results $print [Contents of counters ] |