Displaying 1 to 1 from 1 results

sequence - Simple sequence abstract datatype, intended to iterate efficiently on collections while performing some transformations

  •    OCaml

Simple sequence abstract datatype, intended to iterate efficiently on collections while performing some transformations. Common operations supported by Sequence include filter, map, take, drop, append, flat_map, etc. Sequence is not designed to be as general-purpose or flexible as, say, Batteries' 'a Enum.t. Rather, it aims at providing a very simple and efficient way of iterating on a finite number of values, only allocating (most of the time) one intermediate closure to do so. For instance, iterating on keys, or values, of a Hashtbl.t, without creating a list.