Fork me on GitHub
#clojure-austin
<
2017-11-27
>
gdeer8120:11:41

since ann's number is based off of john's number and john's number is based off of ann's number I memoized those functions so that the recursion wouldn't blow up the jvm

gdeer8120:11:00

especially since part of the challenge was summing all the katas done by a certain day which meant calculating the number of katas for each day first and the way I implemented it meant that to get the list of katas for days 1 to 100 meant that I had to get the number for ann and john for 0 then 1 and 0 then 2,1,0 and 3,1,0 all the way to 100,99,98,97...0 so you could see how this would get very expensive without cacheing

clojuregeek21:11:40

cool 🙂