Zulip Chat Archive

Stream: lean4

Topic: andThen vs seqRight


Eric Wieser (Mar 03 2025 at 21:18):

Are the operations f >> g and f *> g the same? docs#AndThen doesn't seem to have many instances.

Mario Carneiro (Mar 04 2025 at 00:03):

cc: @Sebastian Ullrich who probably remembers the history here better than me. I believe that the fact of the matter is that they are identical in behavior, but I'm unsure if there is a preference for one over the other

François G. Dorais (Mar 04 2025 at 03:00):

Probably not true (nor very relevant) in practice: >> is derived from monad >>= but *> is derived from appicative <*>.

Eric Wieser (Mar 04 2025 at 08:49):

I don't think that's true, >> seems not to be available at all on most monads

Sebastian Ullrich (Mar 04 2025 at 09:14):

We rather use it when a type is not even an Applicative because e.g. it is monomorphic


Last updated: May 02 2025 at 03:31 UTC