You're right to wonder.

In the first code, change the second occurence of "type" to "and" and all is well. Similar to "let rec ... and ..."

By on 10/16/2008 1:39 PM ()

Great, thanks a lot! So, this is obviously also the way of dealing with mutually recursive functions.

Btw, what are motives of the requirement of adding things to scope "top down"? Is it simply inherited from Ocaml, are there any implementation related motives or just an idiom that people agree on? I can definitly see why it is required for "script" files.

Since I'm coming from the Haskell world and I'm actually more used to declaring things the opposite order, i.e. top-level functions at the top of the file and helper functions below.

By on 10/16/2008 2:41 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