I’m pleased to announce the first release of agrid.
Agrid stands for Adjustable Grid. Adjustable grids are basically two dimensional arrays whose width/height can be changed by adding or removing row/column at either end (one at a time).
Here’s a very short example :
let () = let grid = Agrid.of_list [[1; 2]; [3; 4]] in let grid = Agrid.snoc_row grid (Flex_array.of_list [5; 6]) in Agrid.pp Format.pp_print_int Format.std_formatter grid (* prints: * 1; 2 * 3; 4 * 5; 6 *)
It’s been developped at OCamlPro while working on mosaic when we wanted to ease the dataset input process, switching from a basic textarea based input to something which looks like a spreadsheet (this work is not yet published on the online version).