• 0 Posts
  • 25 Comments
Joined 11 months ago
cake
Cake day: December 8th, 2024

help-circle












  • someacnt@sh.itjust.workstoProgrammer Humor@programming.devMonads
    link
    fedilink
    English
    arrow-up
    6
    arrow-down
    1
    ·
    16 days ago

    Monad is (a classes of type of) a collapsible container. Collapsible, like how you can flatten a nested list, or Option<Option<A>> can be flattened to Option<A>.

    A common pattern with monads is the flatMap function, where you apply function A -> List<B> to (each element of) List<A> to obtain List<B>. This happen to represent erroneous call chaining with Option or Result types.