The guard expression, the bit after the when, should be a boolean expression.

What you probably meant was

1
2
3
match x,y with
| x,_ when x <= 0 -> 1
| _ -> 0

Cheers,

Andy.

By on 6/16/2007 11:58 AM ()

Thanks. I think "when" must be after every value, but now I realize that "when" relate to all value.

By on 6/17/2007 12:12 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