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 tttt | |
// Awesome 😄 That looks great. It maintains all of the properties of the Frank (or, Langton style 😛) encoding—where one can recurse with different handlers and short-circuit trivially—without losing the tail-recursive stack safety. And I fully trust you when it comes to the JIT-ability of it all! | |
// The only issues are minor UX ones, in that it could be confusing for the user to know whether to call | |
import izumi.reflect.Tag | |
type Id[T] = T | |
type Const[T] = [U] =>> T | |
type MX[T] = Any |
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 zero | |
import izumi.reflect.Tag | |
import Kyo.* | |
import scala.collection.View.FlatMap | |
type Id[T] = T | |
type Const[T] = [U] =>> T | |
type MX[T] = Any |
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 izumi.reflect.Tag | |
import <.Handler | |
opaque type <[+A, -S] = Zero[A, S] | |
inline implicit def toZero[A, S](v: A): A < S = Zero.Succeed(v) | |
inline implicit def fromZero[A, S](zero: Zero[A, S]): A < S = zero | |
object < : | |
import Zero.* |
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 book | |
object WithoutTypeParams: | |
sealed trait Expr | |
case class IntExpr(int: Int) extends Expr: | |
def add(other: IntExpr): IntExpr = IntExpr(int + other.int) | |
case class BoolExpr(bool: Boolean) extends Expr | |
case class IfThenElseExpr(cond: BoolExpr, thenExpr: Expr, elseExpr: Expr) extends Expr |
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 zio._ | |
import java.io.IOException | |
import java.time.LocalDateTime | |
// | |
// Meetup.com | |
// | |
// Notifications | |
// notify every user who is subbed to an upcoming event |
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 zio.http.api.internal | |
sealed trait Box[A] extends Product with Serializable { self => | |
def zip[B](that: Box[B])(implicit zipper: Zipper[A, B]): Box[zipper.Out] = | |
Box.Zip[A, B, zipper.Out](self, that, zipper) | |
def map[B](f: A => B)(implicit tupleSize: TupleSize[B]): Box[B] = | |
Box.Map(self, f, tupleSize) | |
def tupleSize: Int = self match { |
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 zio.{RuntimeFlags => _, _} | |
import scala.annotation.implicitNotFound | |
// # ANNOUNCEMENTS | |
// - NEXT WEEK (Friday, 16th) : Akka to ZIO Demo | |
// - NEXT, NEXT WEEK (Friday, 23rd): Akka to ZIO Panel | |
// # ZIO API Design Techniques |
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
What a beautiful file. | |
That's great. | |
One more line will do. |
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 zio | |
object PathDependentTypes { | |
val zio1: ZIO[Any, Nothing, Int] = ZIO.succeed(1) | |
val zio2: ZIO[Any, Nothing, Int] = ZIO.succeed(2) | |
val zio3: ZIO[Any, Nothing, Int] = ZIO.succeed(3) | |
val zio4 = zio1 <*> zio2 <*> zio3 <*> zio1 <*> zio2 |
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 zio.interop | |
import com.raquo.laminar.api.L._ | |
import zio._ | |
import zio.internal.{Executor, Platform} | |
import zio.stream.ZStream | |
import scala.concurrent.ExecutionContext | |
import scala.scalajs.js |
NewerOlder