From 9bf79d64d322d0b11facf04a4fbda0548c17e1c3 Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Sun, 12 Mar 2017 00:08:41 -0800 Subject: 3787 --- 061text.mu | 12 ++++++------ html/061text.mu.html | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/061text.mu b/061text.mu index fac5609c..770d74fc 100644 --- a/061text.mu +++ b/061text.mu @@ -5,9 +5,9 @@ def equal a:text, b:text -> result:bool [ load-ingredients an:num, bn:num <- copy a, b address-equal?:boolean <- equal an, bn - reply-if address-equal?, 1/true - reply-unless a, 0/false - reply-unless b, 0/false + return-if address-equal?, 1/true + return-unless a, 0/false + return-unless b, 0/false a-len:num <- length *a b-len:num <- length *b # compare lengths @@ -1348,7 +1348,7 @@ def parse-whole-number in:text -> out:num, error?:bool [ c:char <- index *in, i x:num <- character-to-code c digit:num, error?:bool <- character-code-to-digit x - reply-if error? + return-if error? result <- multiply result, 10 result <- add result, digit i <- add i, 1 @@ -1364,9 +1364,9 @@ recipe character-code-to-digit character-code:number -> result:number, error?:bo load-ingredients result <- copy 0 error? <- lesser-than character-code, 48 # '0' - reply-if error? + return-if error? error? <- greater-than character-code, 57 # '9' - reply-if error? + return-if error? result <- subtract character-code, 48 ] diff --git a/html/061text.mu.html b/html/061text.mu.html index 82032cc6..1d6a67d9 100644 --- a/html/061text.mu.html +++ b/html/061text.mu.html @@ -67,9 +67,9 @@ if ('onhashchange' in window) { 5 load-ingredients 6 an:num, bn:num <- copy a, b 7 address-equal?:boolean <- equal an, bn - 8 reply-if address-equal?, 1/true - 9 reply-unless a, 0/false - 10 reply-unless b, 0/false + 8 return-if address-equal?, 1/true + 9 return-unless a, 0/false + 10 return-unless b, 0/false 11 a-len:num <- length *a 12 b-len:num <- length *b 13 # compare lengths @@ -1410,7 +1410,7 @@ if ('onhashchange' in window) { 1348 ¦ c:char <- index *in, i 1349 ¦ x:num <- character-to-code c 1350 ¦ digit:num, error?:bool <- character-code-to-digit x -1351 ¦ reply-if error? +1351 ¦ return-if error? 1352 ¦ result <- multiply result, 10 1353 ¦ result <- add result, digit 1354 ¦ i <- add i, 1 @@ -1426,9 +1426,9 @@ if ('onhashchange' in window) { 1364 load-ingredients 1365 result <- copy 0 1366 error? <- lesser-than character-code, 48 # '0' -1367 reply-if error? +1367 return-if error? 1368 error? <- greater-than character-code, 57 # '9' -1369 reply-if error? +1369 return-if error? 1370 result <- subtract character-code, 48 1371 ] 1372 -- cgit 1.4.1-2-gfad0