So I gave my pizza lunch talk on monads today, having over the past couple of weeks snuck in considerably more than a single Gold Card day’s worth of work. I think it went fairly well and was mostly comprehensible, though on the comprehensibility front it probably helped that a lot of my statements were wrapped in “I’m not sure what…”, “I’m not sure whether…” and “I’m not sure why…” —
— which, if you think about it, is really just a kind of Option
(a.k.a. Maybe
), so it’s totally appropriate.
At least, that’s (provisionally) my story and I’m (for now) sticking to it.
I got as far (I think) as figuring out what a monad is (mostly), and (I think) how the Scala List
and Option
monads work (mostly), largely by porting (partially) List
and Option
to Java. I mean to turn the talk into a post here, but that’ll take a couple of days — maybe longer if I get ambitious about cleaning up the code examples.
What I didn’t get to in any detail was Dan’s question about state, which was sort of the main point of this investigation, along with I/O and error handling. Always leave yourself some work for tomorrow, I’ve been told….