Skip to content

Instantly share code, notes, and snippets.

View anttikuuskoski's full-sized avatar

Eino-Antti Kuuskoski anttikuuskoski

View GitHub Profile
@anttikuuskoski
anttikuuskoski / CompositionWithMultipleParameters.md
Last active May 4, 2021 10:52 — forked from cscalfani/CompositionWithMultipleParameters.md
Functional Composition with Multiple Parameters in Haskell

Functional Composition with Multiple Parameters in Haskell

In the past, I've written composition functions in both Elm and Haskell that take multiple parameters for the leftmost function, i.e. the function that gets applied first.

(All examples here are in Haskell)

Here was my Haskell implemenation (stolen from the web):

compose2 :: (c -> d) -> (a -> b -> c) -> a -> b -> d
@anttikuuskoski
anttikuuskoski / .block
Created December 29, 2016 12:06 — forked from mbostock/.block
Brush & Zoom
license: gpl-3.0