aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/program/aedifex/hash.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-08-11 04:15:07 -0400
committerEduardo Julian2022-08-11 04:15:07 -0400
commit065e8a4d8122d4616b570496915d2c0e2c78cd6b (patch)
treef2bbdc3e40b796b34026ab04c9a478d8a3f082d5 /stdlib/source/program/aedifex/hash.lux
parent68d78235694c633c956bb9e8a007cad7d65370bc (diff)
Re-named the "case" macro to "when".
Diffstat (limited to 'stdlib/source/program/aedifex/hash.lux')
-rw-r--r--stdlib/source/program/aedifex/hash.lux6
1 files changed, 3 insertions, 3 deletions
diff --git a/stdlib/source/program/aedifex/hash.lux b/stdlib/source/program/aedifex/hash.lux
index 4506720a1..eedf5e464 100644
--- a/stdlib/source/program/aedifex/hash.lux
+++ b/stdlib/source/program/aedifex/hash.lux
@@ -60,7 +60,7 @@
(Format Binary)
(binary.mix (function (_ byte representation)
(let [hex (at n.hex encoded byte)
- hex (case (text.size hex)
+ hex (when (text.size hex)
1 (format "0" hex)
_ hex)]
(format representation hex)))
@@ -128,7 +128,7 @@
chunk 0
output (binary.empty hash_size)])
(let [index (n.* chunk i64.bytes_per_i64)]
- (case (text.split_at ..hex_per_chunk input)
+ (when (text.split_at ..hex_per_chunk input)
{.#Some [head tail]}
(do try.monad
[head (at n.hex decoded head)
@@ -136,7 +136,7 @@
(again tail (++ chunk) output))
{.#None}
- (case (..hash_size input)
+ (when (..hash_size input)
0 (constructor output)
(^.with_template [<size> <write>]
[<size>