• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

input-output-hk / atala-prism-building-blocks / 8439440788

26 Mar 2024 04:24PM UTC coverage: 31.453% (+0.3%) from 31.137%
8439440788

Pull #927

web-flow
Merge branch 'main' into feat/ATL-6599-use-zio-failures-and-defects-effectively-in-connect
Pull Request #927: feat(connect): ATL-6599 Use ZIO Failures and Defects effectively + RFC-9457 in connect

112 of 227 new or added lines in 16 files covered. (49.34%)

401 existing lines in 91 files now uncovered.

4472 of 14218 relevant lines covered (31.45%)

0.31 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

33.33
/shared/src/main/scala/io/iohk/atala/shared/utils/Traverse.scala
1
package io.iohk.atala.shared.utils
2

3
/** A lightweight DIY version of traverse to not rely on Cats because Scala3 + Cats implicits break the IDE compile
4
  * server making the development counterproductive.
5
  */
6
object Traverse {
7

8
  extension [A](ls: Seq[A]) {
1✔
UNCOV
9
    def traverse[E, B](f: A => Either[E, B]): Either[E, Seq[B]] =
×
10
      ls.foldRight[Either[E, List[B]]](Right(Nil))((i, acc) => acc.flatMap(ls => f(i).map(_ :: ls)))
11
  }
12

13
  extension [A, E](ls: Seq[Either[E, A]]) {
×
14
    def sequence: Either[E, Seq[A]] = ls.traverse(identity)
15
  }
16

17
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc