These are chat archives for got-lambda/expression

15th
Dec 2017
jolod
@jolod
Dec 15 2017 11:29
I have a new favorite for the AoC meetup: day 6. It just reads so nice: (defn reallocation-routine [banks] (iterate redistribute banks))
jolod
@jolod
Dec 15 2017 11:34
It's great for writing functionally even though it's very iterative and not your typical recursive algorithms that's always a natural fit for FP.
Marco Zocca
@ocramz
Dec 15 2017 11:38
what's the signature of iterate and redistribute?
jolod
@jolod
Dec 15 2017 12:25
Iterate is (a -> a) -> a -> LazySeq a.
jolod
@jolod
Dec 15 2017 22:36
@Jell Regarding my point against REPL-driven development, I do think TDD (or just having tests, test-driven or not) would have solved this. I'm pretty sure I would have written down tests that would have caught those bugs. Both for the hex walker and for the balanced tower.
@ocramz Is there a way to generalize the CloudException so that these parse errors need not be "hardcoded"?
Marco Zocca
@ocramz
Dec 15 2017 23:30
@jolod what do you mean? if you're worried about extensibility, Cloud is an instance of MonadThrow, so you can throwM from inside it
otherwise, please share your thoughts