ocaml-attic / ocaml-cstruct

Map OCaml arrays onto C-like structs via a syntax extension, and generate functions to convert to-and-from native OCaml values.
http://www.openmirage.org/
10 stars 2 forks source link

cstruct.iter vs cstruct.fold #8

Open mor1 opened 11 years ago

mor1 commented 11 years ago

currently, Cstruct.iter basically turns a buffer in to an iterable of parsed structures. Cstruct.fold then folds over such an iterable with an accumulator.

it seems like there should also be functions that iterate and map over the iterable that comes out of Cstruct.iter, and (perhaps) that the current Cstruct.iter should be renamed to Cstruct.mk_iter or somesuch.

thoughts?