Skip to content

Instantly share code, notes, and snippets.

View peri4n's full-sized avatar
🎯
Focusing

Fabian Bull peri4n

🎯
Focusing
View GitHub Profile
@graninas
graninas / haskeller_competency_matrix.md
Last active April 8, 2025 16:34
Haskeller competency matrix
@odersky
odersky / adhocpoly.scala
Last active February 18, 2022 13:08
A Scala translation of James Ward's ContextReceivers example
// A literal Scala translation of James Ward's Context receivers example
// https://github.com/jamesward/oop-evolution/blob/context-receivers/gradleable/src/main/kotlin/adhocpoly/ContextReceivers.kt
// I had to rename `sum` to `summ` since `sum` already exists as a method on lists in Scala.
package adhocpoly
trait Summable[T]:
def tplus(t1: T, t2: T): T
object Summable:
def tplus[T](t1: T, t2: T)(using s: Summable[T]) = s.tplus(t1, t2)