Skip to content

Instantly share code, notes, and snippets.

View valentiay's full-sized avatar
🕊️

Alexander Valentinov valentiay

🕊️
  • suslentiay
  • Almaty
View GitHub Profile
import cats.syntax.functor._
sealed trait Foo
@ElementCodec
case class Bar(a: Int) extends Foo
@ElementCodec
case class Qux(b: String) extends Foo
object Foo {
implicit val fooDecoder: ElementDecoder[Foo] = ElementDecoder[Foo] {
import scala.util.Random
import scala.concurrent.duration._
import cats.effect.{ExitCode, IOApp, IO}
import cats.effect.concurrent.MVar
import cats.instances.list._
import cats.syntax.apply._
import cats.syntax.parallel._
object ConsensusApp extends IOApp {