Skip to content

Instantly share code, notes, and snippets.

View AHartNtkn's full-sized avatar

Anthony Hart AHartNtkn

View GitHub Profile
@AHartNtkn
AHartNtkn / search.hvm
Last active November 14, 2024 06:18
Interleaving Search in HVM1 (dup_labels branch)
// Prelude stuff
(String.concat String.nil ys) = ys
(String.concat (String.cons x xs) ys) = (String.cons x (String.concat xs ys))
// Search Stuff
(List.head List.nil) = (Err "Head Taken on empty list")
(List.head (List.cons x _)) = x
(List.take 0 xs) = List.nil
(List.take n List.nil) = List.nil