- 498 名前:名無しさん♯ mailto:sage [2007/07/28(土) 08:01:14 ]
- 作ってみた。
#light type OptionBuilder () = member o.Return x = Some x member o.Bind (v, f) = match v with Some x -> f x | _ -> None member o.Let (x, f) = f x let option = OptionBuilder () let _ = option { let x = 100 let! y = None return (x * y) } |> print_any; print_newline () (実行結果) None
|

|