Skip to content

Instantly share code, notes, and snippets.

@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._
@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()
@Iltotore
Iltotore / IntersectionTypeMirror.scala
Last active June 20, 2024 22:47
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]:
@kubukoz
kubukoz / .scalafmt.conf
Last active October 6, 2024 15:40
How to disable significant indentation in Scala
runner.dialect = scala3
runner.dialectOverride.allowSignificantIndentation = false
# allows `if x then y`
runner.dialectOverride.allowQuietSyntax = true