Skip to content

Instantly share code, notes, and snippets.

Avatar

Eino-Antti Kuuskoski anttikuuskoski

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

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 Dec 29, 2016 — forked from mbostock/.block
Brush & Zoom
View .block
license: gpl-3.0