Collection structures implemented in C, with a bit of functional programming