It is not possible to use a function before it's defined, except in the limited case of 'let rec ... and ...' and methods in 'type ... and ...'.

(Also interfaces: e.g. define IFoo, write code using IFoo, later create classes that implement IFoo.)

.fsi files are just for summarizing the contents of an implementation file as well as selectively hiding/exposing some members to the subsequent files in the project.

By on 4/12/2009 12:55 PM ()

OK, thx. Pity though, it would be neat to write programs top-down by declaring all funtions (C++ style, also possible in Haskell) and then defining the main functions first and the subordinate stuff later in the file.

Writing bottom-up takes a little getting used to.

By on 4/13/2009 12:35 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