vsavkin / fpdart

Functional Programming in Dart
Other
47 stars 7 forks source link

map for Strings #4

Open cgarciae opened 10 years ago

cgarciae commented 10 years ago

How to iterate over strings? Since Strings are not iterable, functions like _.map don't work. I was thinking maybe this library could define a new class like

class CharList with IterableMixin<String>
{
    List<String> charList;

    Char (String str)
    {
        charList = str.split("");
    }

    //Implement Iterable Interface
}

so you can get consistent iterables from Strings.