package app.furmeet.events.system.helper.observables

interface Observer<T> {
    fun update(observable: Observable<T>, args: T?)

    companion object {
        operator fun <T> invoke(callback: (Observable<T>, T?) -> Unit) = object : Observer<T> {
            override fun update(observable: Observable<T>, args: T?) = callback(observable, args)
        }
    }
}