Any thoughts on this practice: how about using a `...
# fp-in-kotlin
b
Any thoughts on this practice: how about using a
typealias
instead of an interface (SAM) ?
Copy code
typealias AtomToMoleculeConverter = (Atom, Atom) -> Molecule?

class DefaultConverter : AtomToMoleculeConverter {
    override fun invoke(p1: Atom, p2: Atom): Molecule? {
        TODO("impl does not matter")
    }
}
Above fragment looks OK to me but how do you go about to write an implementation for that typealias?