Rerouted (retagged, needs approval). The tag now points at a different commit than when this version was published. The Lamdera package server serves a copy recovered from https://github.com/jamesrweb/elm-combinators.
What we checked: Tag 2.0.0 is still on github.com/jamesrweb/elm-combinators; its commit 3a6bfd4fff4e is from 2026-08-30 04:45 UTC, after the version was published (2026-08-30 03:44 UTC); elm.json is byte-identical to package.elm-lang.org's; the exposed modules match docs.json; the zip's SHA-1 is not the published one and nothing else confirms its contents.
We could not verify this copy against what was published, so the Lamdera compiler asks before using it (y/n). Without a terminal, as in CI, it stops with an error unless approved:
lamdera make --auto-approve-package-rerouting approves rerouted versions for that run,LAMDERA_AUTO_APPROVE_PACKAGE_REROUTING=1 does the same for every run in that environment,LAMDERA_CACHE=off skips the Lamdera package server altogether: packages come from package.elm-lang.org and GitHub only, as with elm, and a rerouted version then fails to download.Details · package.elm-lang.org's zip: https://github.com/jamesrweb/elm-combinators/zipball/2.0.0/
The B combinator.
The equivilent of the composition operator ((<<)) in Elm.
isEven : Int -> Bool
isEven n = modBy 2 n == 0
double : number -> number
double = ((*) 2)
Combinators.b not isEven 2 --> False
Combinators.b not isEven 1 --> True
Combinators.b String.fromInt double 4 --> "8"The B1 combinator.
Combinators.b1 String.toFloat String.append "3" ".14" --> Just 3.14
Combinators.b1 (modBy 2) (\x y -> x * y) 2 3 --> 0The B2 combinator.
createUser : String -> Int -> Bool -> { name : String , age : Int , online : Bool }
createUser name age online = {
name = name ,
age = age ,
online = online
}
incrementUserAge : { name : String , age : Int , online : Bool } -> { name : String , age : Int , online : Bool }
incrementUserAge user =
{ user | age = user.age + 1 }
Combinators.b2 List.sum (\x y z -> [x, y, z]) 1 2 3 --> 6
Combinators.b2 incrementUserAge createUser "John" 36 True --> { name = "John", age = 37, online = True }The B3 combinator.
Combinators.b3 (\n -> n + 15) (\n -> n - 10) (\n -> n * 2) 50 --> 105
Combinators.b3 (Combinators.c String.append "1") ((++) "2") String.fromInt 50 --> "2501"The B Prime (B') combinator.
Combinators.bp (+) 1 Basics.identity 2 --> 3
Combinators.bp (++) [ 1, 2, 3 ] List.singleton 4 --> [1, 2, 3, 4]The C combinator.
Takes a binary function and two further arguments which are then applied inversely.
multiplyList : List Int -> Int -> List Int
multiplyList items multiple =
List.map ((*) multiple) items
Combinators.c multiplyList 10 [1, 2, 3] --> [10, 20, 30]Useful in pipelines where the piped value is required to be the first argument to a function.
[1, 2, 3]
|> Combinators.c multiplyList 5
|> List.sum
--> 30The C Prime (C') combinator.
Combinators.cp (+) (\x -> x * 2) 3 4 --> 11
Combinators.cp List.append List.singleton [ 3, 2, 1 ] 4 --> [4, 3, 2, 1]The C Star (C*) combinator.
Flips the third and fourth arguments when applied to the given ternary function.
Combinators.cs Basics.clamp 100 200 150 --> 150
Combinators.cs (\four six three -> four + six * three) 4 3 6 --> 22The C Star Star (C**) combinator.
Flips the fourth and fifth arguments when applied to the given quaternary function.
Combinators.css (\two four six three -> (two - four + six) * three) 2 4 3 6 --> 12The D combinator.
Calls a given function with a given argument.
Sometimes referred to as "the reverse pipe operator".
The equivilent of the "pipe left" operator (<|) in Elm.
Combinators.d (+) 5 Basics.identity 2 --> 7The D1 Combinator.
Combinators.d1 Basics.clamp 100 200 ((*) 2) 110 --> 200The D2 combinator.
Combinators.d2 (+) Basics.identity 2 ((*) 2) 11 --> 24The E combinator.
Combinators.e (+) 6 (*) 2 3 --> 12The Ê Combinator.
Named 'eb' for alphabetic consistency with the e combinator.
I would have named this function 'ê' but Elm does not support that as a function name in the @docs block. Accordingly, this was the next best name I could think of based on other language / library implementations I have seen.
Combinators.eb (+) (-) 50 25 (*) 3 2 --> 31The F combinator.
Combinators.f 6 2 (-) --> -4
Combinators.f "Hi" 3 String.repeat --> "HiHiHi"The F Star (F*) combinator.
Equivilant to S Prime here and known to Haskell programmers as liftA2 and liftM2 for the Applicative and Monadic instances of (->).
Combinators.fs Basics.clamp 120 200 100 --> 120The F Star Star (F**) combinator.
Flips the third and fifth arguments when applied to the given quaternary function.
The G combinator.
Combinators.g (+) ((*) 2) 6 1 --> 13The H combinator.
Combinators.h (\x1 y x2 -> ( x1, x2, y )) 1 2 --> (1, 1, 2)The I combinator.
Returns whatever it is given.
Combinators.i 1 --> 1
Combinators.i [ 1, 2, 3 ] --> [1, 2, 3]
Combinators.i String.fromInt --> String.fromIntThe I Star (I*) combinator
Implemented in terms of the I combinator.
Combinators.is (\n -> n - 1) 10 --> 9The I Star Star (I**) combinator.
Implemented in terms of the I combinator.
Combinators.iss (\n m -> n - m) 10 4 --> 6The J combinator.
This is the J combinator of the literature.
Combinators.j (+) 10 20 40 --> 70The J Star (J*) combinator.
This is the J combinator of Joy. It is not the jay combinator (J) of the literature.
Credit: Rayward-Smith and Burton (See Antoni Diller 'Compiling Functional Languages' page 104).
Combinators.js Basics.identity 10 20 --> 10The J Prime (J') combinator - prime of the J Star (Joy) combinator.
Credit: Rayward-Smith and Burton (See Antoni Diller 'Compiling Functional Languages' page 104).
Combinators.jp (+) 10 20 40 --> 30The K combinator.
Corresponds to the encoding of true in lambda calculus.
Returns the first argument provided, ignoring the second.
Combinators.k "hello" 2 --> "hello"
Combinators.k Nothing [ 1, 2, 3 ] --> Nothing
Combinators.k String.fromInt (Just 2) --> String.fromIntThe KI combinator.
Corresponds to the encoding of false in lambda calculus.
Returns the second argument provided, ignoring the first.
Combinators.ki "hello" 2 --> 2
Combinators.ki Nothing [ 1, 2, 3 ] --> [ 1, 2, 3 ]
Combinators.ki String.fromInt (Just 2) --> Just 2The O combinator.
Combinators.o (\f -> f 2 6) (+) 5 --> 13The P combinator.
Transforms two inputs and combines the outputs.
Equivelent of the on operator in Haskell.
add : number -> number -> number
add = (+)
double : number -> number
double = ((*) 2)
Combinators.p add double 3 12 --> 30The Pheonix (Big Phi) combinator, also known as Turner's S Prime (S') combinator.
Equivilant to S Prime here and known to Haskell programmers as liftA2 and liftM2 for the Applicative and Monadic instances of (->).
Combinators.px (+) ((*) 2) ((-) 3) 5 --> 8The Q combinator.
Reverse function composition.
Combinators.q ((+) 2) ((*) 4) 10 --> 48
Combinators.q String.toUpper (\name -> "My name is " ++ name) "John" --> "My name is JOHN"The Q1 combinator.
Combinators.q1 ((+) 2) 10 ((*) 4) --> 42
Combinators.q1 String.toUpper "John" (\name -> "My name is " ++ name) --> "MY NAME IS JOHN"The Q2 combinator.
Combinators.q2 10 ((+) 2) ((*) 4) --> 42
Combinators.q2 "John" String.toUpper (\name -> "My name is " ++ name) --> "MY NAME IS JOHN"The Q3 combinator.
Combinators.q3 ((+) 2) 10 ((*) 4) --> 48
Combinators.q3 String.toUpper "John" (\name -> "My name is " ++ name) --> "My name is JOHN"The Q4 combinator.
Combinators.q4 10 ((+) 2) ((*) 4) --> 48
Combinators.q4 "John" String.toUpper (\name -> "My name is " ++ name) --> "My name is JOHN"The R combinator.
Combinators.r 10 (-) 12 --> 2
Combinators.r "second" (\a b -> a ++ " " ++ b) "first" --> "first second"The R Star (R*) combinator.
Reverses the second, third and fourth arguments when applied to the given ternary function.
Combinators.rs Basics.clamp 10 100 200 --> 100
Combinators.rs Basics.clamp 110 100 200 --> 110
Combinators.rs Basics.clamp 220 100 200 --> 200The R Star Star (R**) combinator.
Flips the third and fifth arguments when applied to the given quaternary function.
Combinators.rss (\six nine ten four -> six - nine + ten * four) 6 4 9 10 --> 37The S combinator.
Combinators.s (+) ((*) 2) 10 --> 30
Combinators.s (-) (\v -> v * 7) 4 --> -24
Combinators.s (\user newAge -> { user | age = newAge }) (\user -> user.age + 1) { age = 35 } --> { age = 36 }The S Prime (S') combinator.
Combinators.sp (+) ((*) 2) ((-) 3) 5 --> 8The T combinator.
Sometimes referred to as "the forward pipe operator".
The equivilent of the "pipe right" operator (|>) in Elm.
Combinators.t 1 Basics.identity --> 1
Combinators.t 20 ((+) 2) --> 22
Combinators.t "Hello" (\v -> v ++ " world!") --> "Hello world!"The V combinator.
Combinators.v 1 2 (+) --> 3
Combinators.v 3 "Hello" String.repeat --> "HelloHelloHello"The V Star (V*) combinator.
Combinators.vs (\two one three -> one + two - three) 1 2 3 --> 0The V Star Star (V**) combinator.
Combinators.vss (\one four two three -> (one + two) - (three + four)) 1 2 3 4 --> -4The W combinator.
Provides a given argument as both values to a given binary function.
Combinators.w (+) 2 --> 4The W1 combinator.
The W combinator but with the arguments reversed.
Converse warbler.
Combinators.w1 2 (+) --> 4The W Star (W*) combinator.
Warbler once removed.
Combinators.ws (\x y z -> [ x, y, z ]) 1 2 --> [1, 2, 2]The W Star Star (W**) combinator.
Warbler twice removed.
Combinators.wss (\w x y z -> [ w, x, y, z ]) 1 2 3 --> [1, 2, 3, 3]
The A combinator.
Implemented in terms of the I combinator.