Could someone elaborate on where/when I should be using Sequence<*> vs Collection<*>? IntelliJ has started giving me lints recommending that a call chain should use Sequence, but I'm still confused as to when I should use that. I know that Sequences are lazy and Collections are eager, but I'm not sure when to use either
v
Vladyslav Sitalo
09/23/2018, 10:34 PM
In your example, I don’t believe
toList
is necessary
Vladyslav Sitalo
09/23/2018, 10:38 PM
To answer a more general question - sequence can potentially give you better results on long list of transformations/large collections.