Given the following functions:
def foo( a: A ): ValidationNEL[String,Seq[B]] = ...
def bar( b: B ): ValidationNEL[String,C] = ...
I would like to combine them such as to build a function, which calls foo
then eventually calls bar
on each elements in the produced Seq
, such a to get a ValidationNEL[String,Seq[C]]
:
def fooAndBar( a: A ): ValidationNEL[String,Seq[C]]
Documentation in Scalaz 7 is very short and I could not find any relevant example.
flatMap
does not seem to be a member ofValidation
. There is however abind
method. Should some implicit conversion take place ? – Bulkhead