RosettaCodeData/Task/Higher-order-functions/Standard-ML/higher-order-functions-1.ml
Ingy döt Net d066446780 langs a-z
2013-04-10 22:43:41 -07:00

8 lines
221 B
OCaml

- fun func1 f = f "a string";
val func1 = fn : (string -> 'a) -> 'a
- fun func2 s = "func2 called with " ^ s;
val func2 = fn : string -> string
- print (func1 func2 ^ "\n");
func2 called with a string
val it = () : unit