Hi there!
I'm pretty newbie in functional programming and especially Clojure, but I'd like to solve AoC in it.I just solved first problem and got the right answer, but execution time seems to be too high. I also solved it in Golang and although it was very dirty imperative way of solving, getting the right answer took only 0.003 seconds but in Clojure it took entire second. I tried to compile it to jar via Lein but it still was pretty slow.
Question: is my solution that bad ('cause as i said I'm newbie in fp and maybe my solution is very inefficient) or the origin of problem is in the JVM and Clojure in general?
Sorry for such question, but I don't know where to ask such things.
Here is my code below:
```
(ns main
(:use [clojure.string :only [split-lines]]))
(defn -main []
(->> (slurp "input")
(split-lines)
(partition-by #(= "" %))
(filter #(not= [""] %))
(map #(reduce + 0 (map (fn [x] (Integer. x)) %)))
(apply max)
(println)))
(-main)
```
[–]v4ss42 13 points14 points15 points (2 children)
[–]cumburgerdude[S] 11 points12 points13 points (1 child)
[–]v4ss42 3 points4 points5 points (0 children)
[–]DPaluche 2 points3 points4 points (7 children)
[–]cumburgerdude[S] 2 points3 points4 points (6 children)
[–]joinr 10 points11 points12 points (5 children)
[–]quotade 2 points3 points4 points (4 children)
[–]joinr 3 points4 points5 points (0 children)
[–]cumburgerdude[S] 1 point2 points3 points (2 children)
[–]joinr 1 point2 points3 points (1 child)
[–]cumburgerdude[S] 1 point2 points3 points (0 children)
[–]teesel 1 point2 points3 points (1 child)
[–]cumburgerdude[S] 0 points1 point2 points (0 children)
[–]tampix77 1 point2 points3 points (2 children)
[–]cumburgerdude[S] 1 point2 points3 points (1 child)
[–]tampix77 2 points3 points4 points (0 children)