These are chat archives for jdubray/sam

3rd
Jan 2018
Łukasz Lityński
@hex13
Jan 03 2018 19:53
can nap from SAM be thought as act of napping? (I mean " to sleep briefly especially during the day ") ? I know that it is abbreviation of "next-action predicate" but I before I knew that I thought it was "nap" like "sleep briefly" and during that "sleep" next action is born
did I make this up, or this metaphor really exists in SAM pattern?
Michael Terry
@formido
Jan 03 2018 22:01
@jdubray So far my favorite explanation of monads is the first one here:
Everyone tries to explain them abstractly or mathematically, but it's just an operator that has a behavior that you can grasp pretty easily
from there, presumably, then you can build up to an abstract understanding
which I think is generally how humans build up abstractions in any case, so I don't know why monad explanations usually give short shrift to the concretes first
Jean-Jacques Dubray
@jdubray
Jan 03 2018 23:25

@formido thank you, this is very useful. I agree that's the best I have seen so far. That's what I was looking for.

Since the bind operation combines functions, it can execute them as it sees fit: sequentially, multiple times, in reverse, discard some, execute some on a separate thread when it feels like it and so on.

I am not sure I am a big fan of functional programming anymore, or ever was. I still like Higher Order Functions and Closures, but monads sounds incredibly rigid for achieving that particular result. I'll have to keep looking at more examples.