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
(******************************************************************************) | |
(** | |
** Just some notations | |
**) | |
let[@inline] ( ~~ ) to_apply ~(f : _ -> _) = to_apply f | |
let[@inline] ( ~~~ ) to_apply x ~(f : _ -> _) = to_apply x f | |
let[@inline] ( ~~~~ ) to_apply x y ~(f : _ -> _) = to_apply x y f | |
let[@inline] ( ~> ) to_apply ~(f : _ -> _) ~init s = to_apply f init s (* fold_left *) |
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
#!/usr/bin/ocaml | |
(* | |
* Reads an UTF-8 text and writes it on standard output. Invalid codes are | |
* regarded as CP1252-encoded characters and are converted to UTF-8. | |
*) | |
let substitute = "�" | |
let buf = object (self) |