meanwhile you can use an epimorphism to lift any `...
# announcements
t
meanwhile you can use an epimorphism to lift any
Killer -> A
function to a
Test -> A
function but it's somewhat annoying to use
b
I'd need more time to understand it.
t
typeclasses are something like static interfaces and you can have multiple implementations of a typeclass for a type
b
thx. that's an interesting topic
t
for example consider an interface
Monoid
for something that can be empty and combined:
Copy code
typeclass Monoid<M> {
     fun empty(): M
     fun combine(a: M, b: M): M
}
Int
can implement this in two ways. Either with
0
and `+`:
Copy code
instance Monoid<Int> {
    fun empty() = 0
    fun combine(a: Int, b: Int) = a + b
or with
1
and `*`:
Copy code
instance Monoid<Int> {
    fun empty() = 1
    fun combine(a: Int, b: Int) = a * b
in this case there are also some laws for monoids: for all a: combine(a, empty()) == a