Welcome! Got a question? Do you have -Ypartial-unification turned on? Other FAQs: http://typelevel.org/cats/faq.html
No implicit view available from (Int, Int) => scala.collection.GenTraversableOnce[B]
. How can I create GenTraversableOnce? The only way is to create a new such instance? for instance new GenTraversableOnce { ... }
mapN
and many other things
dropWhileF(_.attemptT.isLeft)
resource
might help there
Resource
, you have List[A]
and A => Resource
?
Resource
use
as an input
val getFirstResult =
Stream.emits(inputs)
.evalMap(resourceFor(input).use(operation).attempt)
.dropWhile(_.isLeft)
.take(1)
if you want to find the first working resource, acquire, and keep it open, that sucks, and is harder - please see my blog post on concurrent resource caching and adapt for your needs. https://gist.github.com/Daenyth/28243952f1fcfac6e8ef838040e8638e
operation
is a function passed in, correct?
Yes