Skip to content

Releases: bartop/tpl

Tpl 1.0 - first stable version

11 Feb 00:57
Compare
Choose a tag to compare
Pre-release
v1.0.0

Update README.md

TPL - initial release

01 Feb 11:03
Compare
Choose a tag to compare
TPL - initial release Pre-release
Pre-release

TPL v0.0.49

Available features:

Piping operations

It is possible to chain operations using operator |. Input can be any object of class that implements begin() and end() functions in way compliant with C++ standard. There are three types of structures defined within library: generators, operations and sinks.

Generators

Currently available generators are:

  • infinite - generate infinitelly long input sequence of a single value,
  • generator - generate infinite sequence using supplied user function

Operations

Currently library supplies following operations:

  • filter - filter the given enumerable testing against supplied predicate
  • flatten - turn nested enumerables into concatenation of inside enumerables
  • keys - get keys of associative enumerable
  • mapped_values - get mapped values of associative enumerable
  • sort - sort given enumerable according to supplied predicate
  • transform - transform every element in input enumerable using given predicate
  • zip - create enumerable that iterates over pairs of elements of two input enumerables

Sinks

The sinks in the library are:

  • all - returns true if all elements of enumerable comply with given predicate
  • any - returns true if any of elements of enumerable comply with given predicate
  • copy_to - copies input enumerable to given output iterator
  • fold_left - performs left fold on the input enumerable using supplied function, optionally takes also initial value