Re: Syntax for label, NEW PROPOSAL

From: Pierre Weis (Pierre.Weis@inria.fr)
Date: Fri Mar 17 2000 - 08:44:36 MET

  • Next message: Pierre Weis: "Re: let ... in layout"

    > > Objective Caml version 2.99+10
    > >
    > > # let sum l = List.fold_right ( + ) l 0;;
    > > ^^^^^
    > > This expression has type int -> int -> int but is here used with type 'a list
    >
    > Is this not because the new definition of List.fold_right wants the list
    > first, and then only the function ?

    Unfortunately no: List.fold_right expects its arguments as usual:

    latour:~ ocaml -modern
            Objective Caml version 2.99+10

    # List.fold_right;;
    - : fun:('a -> acc:'b -> 'b) -> 'a list -> acc:'b -> 'b = <fun>

    Friendly,

    -- 
    Pierre Weis
    

    INRIA, Projet Cristal, http://pauillac.inria.fr/~weis



    This archive was generated by hypermail 2b29 : Fri Mar 17 2000 - 11:31:26 MET