I found another solution, which makes more sense:

1
2
3
4
5
6
7
8
9
type MaybeBuilder() =
  //...
  member x.Zero()     = None
let secure_div = 
  maybe {
      let! x = readNum()
      let! y = readNum()
      if y<>0 then return x/y
  }
By on 2/25/2009 7:25 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper