Hacker News new | ask | show | jobs
by masklinn 3085 days ago
That's got nothing to do with monads though, you can do that in Swift or Rust which have a monadic option type but don't actually have monads:

    match (xm, ym) {
        (Some(x), Some(y)) => x + y,
        _ => 0
    }