🎄 #AdventOfCode day 1 ! Oh oh oh !
I did this one using #Bash one-liners first but still implemented it as usual in 🐫 #OCaml (and ocamllex) too, for the fun of it :).
🎄 #AdventOfCode day 1 ! Oh oh oh !
I did this one using #Bash one-liners first but still implemented it as usual in 🐫 #OCaml (and ocamllex) too, for the fun of it :).
@p4bl0 Nice solution! I am just trying to get my head around OCaml with AOC. Have you used Base? Or is it the standard library? I habent found List.take in the documentation.
@derheap It's OCaml's Stdlib :). This is the full code of the solution there's nothing else.
List.take may be a new function from 5.5, the documentation is at https://ocaml.org/api/.
You need to log in to see that page.
🎄 #AdventOfCode day 1
I like using ocamllex to read the input but here it was really useless because the parsing is trivial so I made a pure #OCaml version :