use Sets instead of Lists

@williamboxhall The inputs/outputs shouldn't have duplicated elements and the order is not necessary.
The order will be preserved for traverse, collect and get.
On Dec 8, 2014 9:01 PM, "William Boxhall" <notifications@github.com> wrote:

> In src/main/scala/clump/Clump.scala:
>
> >      new ClumpSource(fetch, maxBatchSize)
> >
> > -  def source[T, U](fetch: List[T] => Future[List[U]], maxBatchSize: Int = Int.MaxValue)(keyFn: U => T) =
> > +  def source[T, U](fetch: Set[T] => Future[Iterable[U]], maxBatchSize: Int = Int.MaxValue)(keyFn: U => T) =
>
> I am more concerned about the Clump.traverse. If I do
>
> val tweetIds = List(1,2,3)val tweets = Clump.traverse(tweetIds) { tweets.get(_) }
> tweets ==== List(Tweet(1), Tweet(2), Tweet(3))
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/fwbrasil/clump/pull/10/files#r21480335>.
>