Skip to content

Instantly share code, notes, and snippets.

@livecode-bot
livecode-bot / lec
Created August 29, 2025 21:37
io.livecode.ch/learn/namin/lambda-calculus
typing off;
order normal;
true = lambda x.lambda y.x;
false = lambda x.lambda y.y;
if = lambda b.lambda t.lambda f.b t f;
not = lambda b.b false true;
and = lambda b1.lambda b2.b1 b2 false;
or = lambda b1.lambda b2.b1 true b2;
@livecode-bot
livecode-bot / ex1
Created August 29, 2025 05:18
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}
@livecode-bot
livecode-bot / ex1
Created August 29, 2025 05:18
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}
@livecode-bot
livecode-bot / ex1
Created August 29, 2025 05:18
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}
@livecode-bot
livecode-bot / ex1
Created August 29, 2025 05:18
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}
@livecode-bot
livecode-bot / ex1
Created August 29, 2025 05:17
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}
@livecode-bot
livecode-bot / ex1
Created August 29, 2025 05:17
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}
@livecode-bot
livecode-bot / ex1
Created August 28, 2025 22:54
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}
@livecode-bot
livecode-bot / ex1
Created August 28, 2025 21:41
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}
@livecode-bot
livecode-bot / ex1
Created August 28, 2025 21:41
io.livecode.ch/learn/namin/unsound
object unsoundMini {
trait A { type L >: Any}
def upcast(a: A, x: Any): a.L = x
val p: A { type L <: Nothing } = null
def coerce(x: Any): Nothing = upcast(p, x)
coerce("Uh oh!")
}