Skip to content

Instantly share code, notes, and snippets.

View bgraf's full-sized avatar

Benjamin Graf bgraf

  • Osnabrück University
View GitHub Profile
@bgraf
bgraf / day03.ml
Created December 3, 2019 15:42
day03
open! Base
let input =
let parse_command part =
let direction = part.[0] in
let length = String.drop_prefix part 1 |> Int.of_string in
direction, length
in
Stdio.In_channel.read_lines "input"
|> List.map ~f:(fun line ->