Skip to content

Instantly share code, notes, and snippets.

@Iltotore
Iltotore / IntersectionTypeMirror.scala
Last active July 31, 2023 05:22
Mirror-like union and intersection types derivation
//> using scala "3.2.0"
import scala.quoted.Quotes
import scala.annotation.implicitNotFound
import scala.quoted.*
import scala.collection.View.Empty
trait IntersectionTypeMirror[A]:
@jdegoes
jdegoes / fpmax.scala
Created July 13, 2018 03:18
FP to the Max — Code Examples
package fpmax
import scala.util.Try
import scala.io.StdIn.readLine
object App0 {
def main: Unit = {
println("What is your name?")
val name = readLine()
@kiritsuku
kiritsuku / ClickStreamExample.scala
Last active September 24, 2018 00:44
click stream example
import java.awt.Dimension
import java.awt.event.MouseAdapter
import java.awt.event.MouseEvent
import javax.swing.JFrame
import scala.collection.immutable
import scala.concurrent.duration._
import akka.actor._
import akka.stream._