pub fn parse( dir: String, get_id: fn(a) -> Int, to_state: fn(Int) -> a, ) -> fn(List(String), String, ParseData(a)) -> Result(#(Element(b), a), Snag)