News for hackers. Stuff that matters.
Re:Functors, Applicatives, and Monads in Pictures (2013) by bradrn on Thursday October 21, 2021 @09:49AM (#28944320)
Not at all. There’s sensible implementations which aren’t like that. (You might as well say that (>>=) is just function application proceeded by ‘unwrap’.) My favourite example is cellular automata: if you have a data structure containing a grid along with a position on that grid, then that function signature corresponds precisely to running a cellular automaton on that grid. The idea is that the initial ‘T a -> b’ function is run for every single position, then all the results are combined into a single ‘T b’ grid.
Re:Functors, Applicatives, and Monads in Pictures (2013) by WastingMyTime89 on Thursday October 21, 2021 @05:20PM (#28950959)
Except of course there is no unwrap in the actual definition while both application and return are sure to be there. It’s not like any of this is relevant anyway. The usual abstractions liked by Haskellers are utterly pointless as this whole discussion nicely demonstrate.
Re:Functors, Applicatives, and Monads in Pictures (2013) by Twisol on Thursday October 21, 2021 @07:13PM (#28951963)
> Except of course there is no unwrap in the actual definition while both application and return are sure to be there.

The actual definition of what? `return` is not part of the Comonad class, while `unwrap` (alternatively called `extract`) is not part of the Monad class. No matter what your preferred way of designing abstractions, it seems a strange complaint to say "feature X is useless with abstraction Y" if you don't have a Y in the first place.

> It’s not like any of this is relevant anyway. The usual abstractions liked by Haskellers are utterly pointless as this whole discussion nicely demonstrate.

Well, okay then.

You may not find value in this way of thinking, but other software developers -- many of whom, yes, ship actual software with actual business value -- find these ideas extremely valuable in organizing their thoughts about the problem domain.

I'm open to sharing that mindset with anyone of a curious mind, but most of us aren't going to shove it down your throat. You're welcome to do what works for you.