Skip to content

Instantly share code, notes, and snippets.

View mununki's full-sized avatar
👨‍💻
Reasoning

woonki mununki

👨‍💻
Reasoning
View GitHub Profile
@zehnpaard
zehnpaard / dune
Created June 10, 2019 09:31
OCaml template for menhir/ocamllex/dune indentation-aware parser
(menhir
(modules parser))
(ocamllex lexer)
(executable
(name ex))
@namenu
namenu / 390.re
Last active November 3, 2020 15:22
Reason Dojo
let partition_by_identity = xs => {
let rec impl = (xs, cur) => {
switch (xs, cur) {
| ([], _) => [cur]
| ([x, ...xs], []) => impl(xs, [x])
| ([x, ...xs], [y, ..._]) =>
if (x == y) {
impl(xs, [x, ...cur]);
} else {
[cur, ...impl(xs, [x])];