This file contains hidden or 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 exercise.squants.with_pureconfig | |
import pureconfig.ConfigReader.Result | |
import squants.motion.Pressure | |
import pureconfig.module.squants._ | |
import pureconfig.generic.auto._ | |
import squants.Mass | |
import squants.thermal._ | |
import squants.space._ |
This file contains hidden or 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 exercise.squants.with_circe | |
import eu.timepit.refined.types.string.NonEmptyString | |
import io.circe.parser.parse | |
import squants.market.{Money, Price} | |
import cats.syntax.either._ | |
import io.circe.refined._ | |
import io.circe._ | |
import io.circe.generic.auto._ | |
import squants.space.Volume |
This file contains hidden or 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.{DefaultRuntime, IO, ZIO} | |
// domain layer ----------------------------------------------------------- | |
sealed trait AppError | |
case object NoValue extends AppError | |
case class Movie(id: Int, title: String) | |
trait MovieRepo { | |
def getMovie(id: Int): IO[AppError, Movie] |
This file contains hidden or 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._ |
This file contains hidden or 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) |
OlderNewer