let (|->) value func =
    match value with
        | Left(v) -> func(v)
        | Right(problem) -> Right(problem)