This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import shapeless.ops.coproduct.{IsCCons, Selector, Unifier} | |
import shapeless.{:+:, CNil, Coproduct} | |
// Party Types ------------------------- | |
sealed trait PartyType | |
sealed trait Region extends PartyType | |
sealed trait Division extends PartyType | |
sealed trait Doctor extends PartyType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scalaz.zio.console.Console | |
import scalaz.zio._ | |
// "org.scalaz" %% "scalaz-zio" % "1.0-RC3" | |
sealed trait AppError | |
case object NoValue extends AppError | |
trait Logger { val logger: Logger.Service } | |
object Logger { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qiita | |
import cats.effect._ | |
import cats.syntax.functor._ | |
import fs2.{Pipe, Stream, io, text} | |
import scala.concurrent.duration._ | |
import scala.language.postfixOps | |
trait ConcurrencyDemoApp extends IOApp { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cats.data.{State, Chain} | |
import cats.free.Free | |
import cats.~> | |
import iota.TListK.::: | |
import iota.{CopK, TNilK} | |
sealed trait Interact[A] | |
case class Ask(prompt: String) extends Interact[String] | |
case class Tell(msg: String) extends Interact[Unit] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qiita | |
import cats.effect._ | |
import cats.syntax.functor._ | |
import fs2.concurrent.Queue | |
import fs2.{Pipe, Stream, io, text} | |
import scala.concurrent.duration._ | |
import scala.language.postfixOps |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qiita | |
import java.util.concurrent.{ExecutorService, Executors} | |
import cats.effect._ | |
import cats.syntax.functor._ | |
import fs2.{Pipe, Stream, io, text} | |
import scala.concurrent.ExecutionContext | |
import scala.util.Try |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package qiita | |
import fs2.concurrent.{SignallingRef, Topic} | |
import fs2.{INothing, io, text} | |
import scala.concurrent.duration._ | |
import scala.language.postfixOps | |
sealed trait Event | |
case object Start extends Event |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
<build.sbt> | |
scalaVersion := "2.13.0" | |
libraryDependencies ++= Seq( | |
"com.sksamuel.avro4s" %% "avro4s-core" % "3.0.1", | |
"eu.timepit" %% "refined" % "0.9.9", | |
"io.scalaland" %% "chimney" % "0.3.2" | |
) | |
<plugins.sbt> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import cats.Order | |
import cats.collections.PairingHeap | |
import cats.instances.long._ | |
import PairingHeap.empty | |
type Longs = Stream[Long] | |
implicit val x: Order[Longs] = (x, y) => x.head compare y.head | |
def spin(start: Long, wheel: Longs): Longs = { | |
def cycle(ns: Longs): Longs = ns append cycle(ns) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package trial1 | |
import cats.effect._ | |
import cats.instances.list._ | |
import cats.syntax.flatMap._ | |
import cats.syntax.functor._ | |
import cats.syntax.traverse._ | |
import com.sksamuel.elastic4s.circe._ | |
import com.sksamuel.elastic4s.http.search.SearchResponse | |
import com.sksamuel.elastic4s.http._ |
NewerOlder