2

Iterable and Sequence seem awfully similar, and the collection classes all expose both asIterable() and asSequence().

Are there any semantic or performance considerations to bear in mind when picking one or the other? What circumstances would lead you to prefer one over the other?

More generally, why use an Iterable vs a Sequence?

Jeremy W. Sherman
  • 35,901
  • 5
  • 77
  • 111

0 Answers0