All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.oolong.dispatch.util.kt Maven / Gradle / Ivy

The newest version!
package oolong.dispatch

import oolong.Dispatch

/**
 * Contramap from [Dispatch] of [A] to [Dispatch] of [B]
 *
 * See: [https://oolong-kt.org/recipes/navigation/](https://oolong-kt.org/recipes/navigation/)
 */
fun  contramap(dispatch: Dispatch, f: (B) -> A): Dispatch =
    { b -> dispatch(f(b)) }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy