-
- Downloads
There was an error fetching the commit references. Please try again later.
Add Iterator.partition and std::pair
The method Iterator.partition can be used to partition an Iterator into a Pair of Array objects. The return type is the newly introduced std::pair::Pair, which is a simple binary tuple. We also introduce std::pair::Triple for ternary pairs. We do not introduce any further tuple types, as custom objects are better suited for pairs of more than three values.
Showing
- compiler/lib/inkoc/pass/define_type.rb 1 addition, 1 deletioncompiler/lib/inkoc/pass/define_type.rb
- runtime/src/core/prelude.inko 1 addition, 0 deletionsruntime/src/core/prelude.inko
- runtime/src/std/iterator.inko 30 additions, 0 deletionsruntime/src/std/iterator.inko
- runtime/src/std/pair.inko 190 additions, 0 deletionsruntime/src/std/pair.inko
- runtime/tests/main.inko 1 addition, 0 deletionsruntime/tests/main.inko
- runtime/tests/test/std/test_iterator.inko 18 additions, 0 deletionsruntime/tests/test/std/test_iterator.inko
- runtime/tests/test/std/test_pair.inko 90 additions, 0 deletionsruntime/tests/test/std/test_pair.inko
runtime/src/std/pair.inko
0 → 100644
runtime/tests/test/std/test_pair.inko
0 → 100644
Please register or sign in to comment