At the moment, n Iterwe can do a lot of things with aStringthat we can do to anIter` for example:
each loop
index & range
but we can't apply e.g. filter.
We can call asIter() on String and calling e.g. filter on the result compiles, but does not run.
First prize: make String work as an Iter and make it work with the Hofs. If we get this we should then get rid of the distinction between the 'contains' methods for String and Iter.
Runners up:
Make asIter turn a String into a genuine iterable.
Prevent calling asIter on a String with a compile error.
At the moment, n Iter
we can do a lot of things with a
Stringthat we can do to an
Iter` for example:each
loopbut we can't apply e.g.
filter
.We can call
asIter()
onString
and calling e.g.filter
on the result compiles, but does not run.First prize: make
String
work as anIter
and make it work with the Hofs. If we get this we should then get rid of the distinction between the 'contains' methods forString
andIter
.Runners up:
asIter
turn aString
into a genuine iterable.asIter
on aString
with a compile error.