'a is always type variable, while a is always a simple type. I think it's useful to make the difference clear.

1
2
val f : 'int -> 'int
val g : int -> int

f is a generic function and can have any argument, g only accepts int arguments. Usually, we write the map function like this: "val map: ('a -> 'b) -> 'a list -> 'b list". In this case, your notations wouldn't work (we need to know 'a and 'b can be anything).

By on 5/27/2008 12:04 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