This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns day4 | |
(:require [clojure.java.io :as io] | |
[clojure.string :as str])) | |
(def input1 (io/resource "input1")) | |
(def lines (line-seq (io/reader input1))) | |
(defn parse [crypted] | |
(let [parts (str/split crypted #"-") | |
[sector checksum] (str/split (last parts) #"[\[\]]") |