Advent of Code 2017

Day 4 part 1. How’s this for a beginner?

Show code
(ns main
  (:require [clojure.string :as str]))

(defn read-input-file [filename]
  (->> 
   (slurp filename)
   str/split-lines
   (map read-string)))

(def grid (read-input-file "input.txt"))

(defn checkrow [xs]
  (= (count xs) (count (distinct xs))))

(count (filter true? (map checkrow grid)))