the ! operator is for reading a ref type.

1
2
3
4
5
6
let f = ref 2

let g = !x + 3 // access

f := 5 // assign

i think you want:

1
2
3
4
let rec estPair x = if x = 0 then true else not (estImpair x) 

and estImpair x = if x = 0 then false else estPair (x - 1) 
By on 4/1/2009 6:20 AM ()

the ! operator is for reading a ref type.

Well... I'm not yet on ref types :)

i think you want:

1
2
3
4
let rec estPair x = if x = 0 then true else not (estImpair x) 

and estImpair x = if x = 0 then false else estPair (x - 1) 

Yep, i've found the same solution... thank you!

By on 4/1/2009 6:48 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