Example in README doesn't seem to be strong mode compliant

Issue #1 resolved
Seth Ladd created an issue

Hi, thanks for writing your library!

We saw this in your README:

  for (List combo in combos) {
    print(combo);
  }

Which works in non-strong mode, but apparently doesn't work in strong mode, because combos is not an Iterable. (I think that's the reason).

If you change that example to a classic for(int i... it might work fine.

Thanks!

Comments (3)

  1. Richard Ambler repo owner

    Hi Seth,

    You know, I really like the idea of being able to use the "in" keyword, though... :P

    Also, all the classes extend a single base, abstract class called _Combinatorics so it might be worthwhile for me to play around with getting this base class to implement Iterable and see if I can get everything working in strong mode too.

    Thanks for the interest and for pointing this out!

  2. Richard Ambler repo owner

    Hi Seth,

    I think that the above code should work with trotter now.

    I want to just play around with the code a bit (and familiarize myself with Dart strong mode a bit) before I mark this as resolved...

  3. Log in to comment