From adfa38f737cc158e4a65ca597a0ea585a744869c Mon Sep 17 00:00:00 2001 From: Adam Jeniski Date: Thu, 26 Dec 2024 12:00:26 -0500 Subject: [PATCH] day 24 part 1 --- shared/clj/src/core.clj | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/shared/clj/src/core.clj b/shared/clj/src/core.clj index 3711cd1..2d29cac 100644 --- a/shared/clj/src/core.clj +++ b/shared/clj/src/core.clj @@ -142,6 +142,12 @@ ;; conversions +(defn binary->long [binary-str] + (Long/parseLong binary-str 2)) + +(defn long->binary [value] + (Long/toString value 2)) + (def arrow-char->dir {\> :right \v :down \< :left