Skip to content

Instantly share code, notes, and snippets.

Avatar

juno suárez junoatwork

View GitHub Profile
View machine.js
/* eslint-disable no-undef */
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions
@junoatwork
junoatwork / github.com.css
Created Dec 9, 2020
stylus user style for github darkmode
View github.com.css
@-moz-document domain("github.com") {
[type=checkbox], [type=radio] {
opacity: .8; /** so damn bright normally! */
}
}
View covariance.kt
class A<out T>(val value: T)
class B<T>(val value: T)
fun <T> doA(a: A<T>, t: T): T = t
fun <T> doB(b: B<T>, t: T): T = t
fun <T> doA2(a: A<T>) = fun (t: T): T = t
init {
// this compiles, because T is inferred to be "Any", because A specifies that T is covariant ("out")