Skip to content

Instantly share code, notes, and snippets.

@Decencies
Created November 4, 2022 21:00
Show Gist options
  • Save Decencies/cecab267a7c99c9c297db8f57be07a77 to your computer and use it in GitHub Desktop.
Save Decencies/cecab267a7c99c9c297db8f57be07a77 to your computer and use it in GitHub Desktop.
/**
* Creates a pipeline associated to this block.
*
* @param [I] the current block's input.
* @param [O] the current block's output.
* @param [K] the resulting block's output.
*
* @return a block of type ([I]) -> [K].
*/
operator fun <I, O, K> ((I) -> O).plus(next: (O) -> K): (I) -> K = { input -> next(this(input)) }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment