and this ```val result = either<Throwable, Int&...
# arrow
j
and this
Copy code
val result = either<Throwable, Int> {
    val allEmployees: List<Employee> = allEmployees()()
    val greetings: List<EmailMessage> = birthdayMessages(allEmployees, date)()
    val results: List<String> = greetings.parTraverseEither(<http://Dispatchers.IO|Dispatchers.IO>) {
        println("before")
        val greeting = sendGreeting(it)
        println("after")
        greeting
    }()
    results.map { println(it); 1 }.sum()
}
has no output before or after
p
greetings.length is then > 0…just ruling out the most obvious ones (edited)  [11:33 PM] it may be that allEmployees or birthdayMessages are failing or something [11:33 PM] actually, printing the result of 
env.sendGreetingsUseCase(date = LocalDate.now())
  may help [11:34 PM] whether it’s left or right, if the program finishes it’ll give us information
j
Hi, no printing anywhere changes anything... it's an empty list from
Copy code
greetings.parTraverseEither(<http://Dispatchers.IO|Dispatchers.IO>)
... but I am not sure: can we actually pass
kotlinx.coroutines.Dispatchers
here ?
s
Yes, you can. I wrote some extra docs, and tests in this PR. Seems to run fine. What the value of
greetings
? https://github.com/arrow-kt/arrow-fx/pull/355
j
@simon.vergauwen it's working as expected, ...I was blind 😔 This style of effectful computations is great ! I also noticed parTraverse... fpr Validated in your PR ... will try that too. arrow💯
🙌 1
arrow 1
p
what was the problem then? I’m confused xD
j
short circuiting before even reaching parTraverse, sorry for the confusion 😔