"let rec ... and ..." defines mutually recursive bindings.

[link:msdn.microsoft.com]

By on 4/4/2010 9:05 PM ()

Thanks Brian.

By on 4/5/2010 12:51 PM ()

"and" is just shorthand for another lexically scoped "let" in this case.

If you were using Ocaml syntax, both would be

let ... in

let ... in

i.e., in this case,

let ...

and ... (in)

Anyone: feel free to correct me.

But I think your intuition about the matter (that "and" is lexically

equivalent to "let") is not only observationally correct, but also

syntactically and semantically correct.

I say this because the function signatures are *different* (rec (|ShapeElem|_) vs. (|ShapeElems|_|)...). Were they

the same, I'd be confused as well. :)

By on 4/4/2010 7:42 PM ()
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