let external ['a] (read : unit -> 'a) = "fun () -> input_value stdin"
let external ['a] (write : 'a -> unit) = "fun x -> output_value stdout x"
let ['a] (echo : unit -> unit) = ['a] fun (x : unit) -> write['a] (read['a] ())