let sectioni (_,secs) i = match List.find ~f:(fun s -> s.sec_num = i) secs with | None -> failwith (sprintf "section %d not found" i) | Some s -> s