clojure-austin

https://www.meetup.com/Austin-Clojure-Meetup/
clojuregeek 2017-11-27T17:49:18.000650Z

anybody ever use this? https://clojuredocs.org/clojure.core/memoize

gdeer81 2017-11-27T20:34:05.000194Z

yes

gdeer81 2017-11-27T20:41:33.000240Z

I used it to solve this codewars problem https://www.codewars.com/kata/john-and-ann-sign-up-for-codewars/train/clojure

gdeer81 2017-11-27T20:44:41.000300Z

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

gdeer81 2017-11-27T20:55:00.000012Z

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

clojuregeek 2017-11-27T21:29:40.000105Z

cool 🙂