RosettaCodeData/Task/Higher-order-functions/Standard-ML/higher-order-functions-1.ml
2023-07-01 13:44:08 -04: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