about summary refs log tree commit diff stats
path: root/linux/advent2020/2b.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2021-03-07 21:05:45 -0800
committerKartik K. Agaram <vc@akkartik.com>2021-03-07 21:05:45 -0800
commitde7713d97470528ee47031f64446d45555ee7a10 (patch)
treec8c1e0ad7ca220d062c544cbb673c80c7934a83f /linux/advent2020/2b.mu
parent1a1a1671edd8d27cdd6229c08e6b40a202d85740 (diff)
downloadmu-de7713d97470528ee47031f64446d45555ee7a10.tar.gz
7867
Diffstat (limited to 'linux/advent2020/2b.mu')
-rw-r--r--linux/advent2020/2b.mu6
1 files changed, 3 insertions, 3 deletions
diff --git a/linux/advent2020/2b.mu b/linux/advent2020/2b.mu
index f228b451..121e9dfa 100644
--- a/linux/advent2020/2b.mu
+++ b/linux/advent2020/2b.mu
@@ -52,8 +52,8 @@ fn main -> _/ebx: int {
     }
     skip-chars-matching-whitespace line
     # now check the rest of the line
-    var is-valid?/eax: boolean <- is-valid? pos1, pos2, letter, line
-    compare is-valid?, 0/false
+    var valid?/eax: boolean <- valid? pos1, pos2, letter, line
+    compare valid?, 0/false
     {
       break-if-=
       print-string 0, "valid!\n"
@@ -69,7 +69,7 @@ fn main -> _/ebx: int {
 # ideally password would be a random-access array
 # we'll just track an index
 # one benefit: we can easily start at 1
-fn is-valid? pos1: int, pos2: int, letter: byte, password: (addr stream byte) -> _/eax: boolean {
+fn valid? pos1: int, pos2: int, letter: byte, password: (addr stream byte) -> _/eax: boolean {
   var i/esi: int <- copy 1
   var letter-count/edi: int <- copy 0
   # while password stream isn't empty