From 857e5742761b750e0562e3ce6dcc17ed381d017c Mon Sep 17 00:00:00 2001 From: Gabriel Omar Cotelli Date: Tue, 28 Mar 2017 07:47:11 -0300 Subject: [PATCH] Updated collections documentation. --- README.md | 4 ++++ docs/Collections.md | 15 +++++++++++++++ 2 files changed, 19 insertions(+) create mode 100644 docs/Collections.md diff --git a/README.md b/README.md index a93f336..3840632 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,10 @@ This library provides basic arithmetic abstractions like Percentages. See the [r This library provides support to express optional values and required values, that can be unknown at the beginning of an execution. See the [related documentation.](docs/BindingsAndOptionals.md) +## Collections + +This library provides additional abstractions for Collections. See the [related documentation.](docs/Collections.md) + ## Contributing If you want to help check the [contribution guidelines.](CONTRIBUTING.md) diff --git a/docs/Collections.md b/docs/Collections.md new file mode 100644 index 0000000..1402480 --- /dev/null +++ b/docs/Collections.md @@ -0,0 +1,15 @@ +# Collections + +## Circular Iterator + +A `CircularIterator` provides an abstraction to iterate over a collection rolling over when the end is reached: + +```smalltalk +| iterator | +iterator := CircularIterator cyclingOver: 'abc'. +iterator next "$a". +iterator next "$b". +iterator next "$c". +iterator next "$a". +iterator next "$b". +```