projects
/
advent-of-code-22.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3047c59
)
Point-free
author
Neil Smith
<NeilNjae@users.noreply.github.com>
Sun, 25 Dec 2022 16:49:44 +0000
(16:49 +0000)
committer
Neil Smith
<NeilNjae@users.noreply.github.com>
Sun, 25 Dec 2022 16:49:44 +0000
(16:49 +0000)
advent25/Main.hs
patch
|
blob
|
history
diff --git
a/advent25/Main.hs
b/advent25/Main.hs
index 39ba5c16dff3170a329caa0c1365c2e98d2c6923..f6a284f2e2cab80058544b61795de9a6ab0cad85 100644
(file)
--- a/
advent25/Main.hs
+++ b/
advent25/Main.hs
@@
-25,7
+25,7
@@
snafuValue '=' = -2
snafuValue _ = error "Illegal digit in read"
showSnafu :: Int -> String
-showSnafu
n = reverse $ packSnafu 0 $ toBase5R n
+showSnafu
= reverse . (packSnafu 0) . toBase5R
toBase5R :: Int -> [Int]
toBase5R 0 = []