/foo.ml Secret
Created
January 16, 2019 11:19
partial application in ocaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(* Using Jane Street Core. *) | |
let iteri_every (items : 'a list) (funcs : (int -> 'a -> unit) list): unit = | |
List.iter funcs ~f:(fun f -> List.iteri items f) | |
(* Doesn't type check! *) | |
let iteri_every2 (items : 'a list) (funcs : (int -> 'a -> unit) list): unit = | |
List.iter funcs ~f:(List.iteri items) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment