Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.
Donald Knuth, 1992
Let us change our traditional attitude to the construction of programs. Instead of imagining that our main task is to instruct a computer what to do, let us concentrate rather on explaining to human beings what we want a computer to do.
Donald Knuth, 1992
module String = struct include Stdlib.String module Map = Map.Make(Stdlib.String) end
module String = struct include Stdlib.String module Map = Map.Make(Stdlib.String) end
let ( let< ) ic f =
Fun.protect ~finally:(fun () -> In_channel.close ic) (fun () -> f ic)
let () =
let< ic = In_channel.open_text Sys.argv.(1) in
In_channel.input_lines ic
|> List.concat_map (String.split_on_char ' ')
|> List.iter print_string
let ( let< ) ic f =
Fun.protect ~finally:(fun () -> In_channel.close ic) (fun () -> f ic)
let () =
let< ic = In_channel.open_text Sys.argv.(1) in
In_channel.input_lines ic
|> List.concat_map (String.split_on_char ' ')
|> List.iter print_string