Skip to content

Instantly share code, notes, and snippets.

View sgrove's full-sized avatar
💭
Infinigraph, and beyond!

Sean Grove sgrove

💭
Infinigraph, and beyond!
View GitHub Profile
@aantron
aantron / take.ml
Last active March 15, 2016 22:24
let take limit html =
let spaces = Str.regexp "[ \t\r\n]+" in
let rec repeat acc n v = if n > 0 then repeat (v::acc) (n - 1) v else acc in
let filter_signals =
(0, 0)
|> Markup.transform (fun ((seen, unclosed_elements) as state) signal ->
match signal with
| `Text ss ->