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

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

13 Sep 2023 01:00PM UTC coverage: 29.118% (-0.02%) from 29.14%
6172829202

Pull #714

shotexa
Add all async metrics

Signed-off-by: Shota Jolbordi <shota.jolbordi@iohk.io>
Pull Request #714: [WIP] Metrics for verification flow

16 of 16 new or added lines in 2 files covered. (100.0%)

3456 of 11869 relevant lines covered (29.12%)

0.29 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✔
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