Loading ...
Sorry, an error occurred while loading the content.

Re: "ocaml_beginners"::[] function

Expand Messages
  • Martin Jambon
    ... Yes! -- Martin Jambon, PhD http://martin.jambon.free.fr Freedom for the regexps! http://martin.jambon.free.fr/micmatch-howto.html
    Message 1 of 16 , Oct 4, 2005
    • 0 Attachment
      On Tue, 4 Oct 2005, Java wrote:

      > thanks for all the help you give me!
      >
      > now i'm starting to understand and ca say
      >
      > fun x -> fun y ->(x y);;
      > - : ('a -> 'b) -> 'a -> 'b = <fun>
      >
      > I can say first argument is a function becouse of (x y) tells me y is a
      > parameter of x, an so x must be a function. This function take an
      > argument fo the type of y. And return somthing else of another type. So,
      > if 'a is the type of y I can write:
      >
      > ('a -> 'b)
      >
      > then, the second argument is y, which we say is typed 'a and I have:
      >
      > ('a->'b)->'a
      >
      > and last, the whole function returns what fun x returns:
      >
      > ('a->'b)->'a->'b
      >
      > rigth? (please say yes!)

      Yes!



      --
      Martin Jambon, PhD http://martin.jambon.free.fr
      Freedom for the regexps! http://martin.jambon.free.fr/micmatch-howto.html
    Your message has been successfully submitted and would be delivered to recipients shortly.