modified flatten to return an IndexedSequence and fixed bug where flattened sequences returned the wrong iteration count
Merge pull request #126 from DavidTimms/master

Modified flatten to return an IndexedSequence