Understanding `andThen` vs `flatMap` in TypeScript Effects

Hi, I have played with this difference andThen and flatMap:
const program1 = pipe(O.none(), Effect.andThen(() => O.some(2))
// vs 
const program2 = pipe(O.some(1), Effect.flatMap(() => O.some(2)))

from my understanding is that both behave the same, only the minor difference is that andThen can handle both: andThen(() => O.some(2)) and andThen(O.some(2))
but for flatMap can only handle flatMap(() => O.some(2))

are there any others i might have missed? 🙂
Was this page helpful?