08/11/10 23:15:20
こうじゃない?
let sumIfBothSmall2 (i1, i2) =
attempt.Let(ref 0, (fun sum ->
attempt.Bind(failIfBig i1, (fun n1 ->
attempt.Let(sum := sum.Value+n1, (fun () ->
attempt.Bind(failIfBig i2, (fun n2 ->
attempt.Let(sum := sum.Value+n2, (fun () ->
attempt.Return(sum.Value)))))))))))
ここ見る限り
URLリンク(blogs.msdn.com)