package combic

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
val i : 'a -> 'a
val identity : 'a -> 'a
val k : 'a -> 'b -> 'a

Return first argument, ignoring second

val kestrel : 'a -> 'b -> 'a
val pi : 'a -> 'b -> 'b

Return second argument, ignoring first

val penguin : 'a -> 'b -> 'b
val w : ('a -> 'a -> 'b) -> 'a -> 'b

Passes a single value to both arguments of binary function. eg: let double = warbler (+)

val warbler : ('a -> 'a -> 'b) -> 'a -> 'b
val c : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c

Can be used to flip the arguments of a binary function. eg: cardinal String.concat "a";"b" ","

String.concat: string -> string list -> string, but by using cardinal it changes to string list -> string -> string

val cardinal : ('a -> 'b -> 'c) -> 'b -> 'a -> 'c
val b : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b

Composition eg: bluebird f g = f . g

val bluebird : ('a -> 'b) -> ('c -> 'a) -> 'c -> 'b
val b1 : ('a -> 'b) -> ('c -> 'd -> 'a) -> 'c -> 'd -> 'b

Composition where b takes two arguments eg: blackbird add1 ( * )

val blackbird : ('a -> 'b) -> ('c -> 'd -> 'a) -> 'c -> 'd -> 'b
val b2 : ('a -> 'b) -> ('c -> 'd -> 'e -> 'a) -> 'c -> 'd -> 'e -> 'b

Composition where b takes three arguments eg: blunting add1 ( fun x y z -> x * y *z )

val blunting : ('a -> 'b) -> ('c -> 'd -> 'e -> 'a) -> 'c -> 'd -> 'e -> 'b
val b3 : ('a -> 'b) -> ('c -> 'a) -> ('d -> 'c) -> 'd -> 'b

Composition with 3 functions eg: becard add1 add1 add1

val becard : ('a -> 'b) -> ('c -> 'a) -> ('d -> 'c) -> 'd -> 'b
val s : ('a -> 'b -> 'c) -> ('a -> 'b) -> 'a -> 'c
val starling : ('a -> 'b -> 'c) -> ('a -> 'b) -> 'a -> 'c
val sigma : ('a -> 'b -> 'c) -> ('b -> 'a) -> 'b -> 'c
val violetstarling : ('a -> 'b -> 'c) -> ('b -> 'a) -> 'b -> 'c
val d : ('a -> 'b -> 'c) -> 'a -> ('d -> 'b) -> 'd -> 'c
val dove : ('a -> 'b -> 'c) -> 'a -> ('d -> 'b) -> 'd -> 'c
val delta : ('a -> 'b -> 'c) -> ('d -> 'a) -> 'd -> 'b -> 'c
val zebradove : ('a -> 'b -> 'c) -> ('d -> 'a) -> 'd -> 'b -> 'c
val fi : ('a -> 'a -> 'b) -> ('c -> 'a) -> 'c -> 'c -> 'b
val phoenix : ('a -> 'a -> 'b) -> ('c -> 'a) -> 'c -> 'c -> 'b
val psi : ('a -> 'a -> 'b) -> ('c -> 'a) -> 'c -> 'c -> 'b
val d1 : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> ('e -> 'c) -> 'e -> 'd
val dickcissel : ('a -> 'b -> 'c -> 'd) -> 'a -> 'b -> ('e -> 'c) -> 'e -> 'd
val d2 : ('a -> 'b -> 'c) -> ('d -> 'a) -> 'd -> ('e -> 'b) -> 'e -> 'c
val dovekie : ('a -> 'b -> 'c) -> ('d -> 'a) -> 'd -> ('e -> 'b) -> 'e -> 'c
val e : ('a -> 'b -> 'c) -> 'a -> ('d -> 'e -> 'b) -> 'd -> 'e -> 'c
val eagle : ('a -> 'b -> 'c) -> 'a -> ('d -> 'e -> 'b) -> 'd -> 'e -> 'c
val epsilon : ('a -> 'b -> 'c) -> ('d -> 'e -> 'a) -> 'd -> 'e -> 'b -> 'c
val goldeneagle : ('a -> 'b -> 'c) -> ('d -> 'e -> 'a) -> 'd -> 'e -> 'b -> 'c
val fi1 : ('a -> 'b -> 'c) -> ('d -> 'e -> 'a) -> ('d -> 'e -> 'b) -> 'd -> 'e -> 'c
val pheasant : ('a -> 'b -> 'c) -> ('d -> 'e -> 'a) -> ('d -> 'e -> 'b) -> 'd -> 'e -> 'c
val ehat : ('a -> 'b -> 'c) -> ('d -> 'e -> 'a) -> 'd -> 'e -> ('f -> 'g -> 'b) -> 'f -> 'g -> 'c
val baldeagle : ('a -> 'b -> 'c) -> ('d -> 'e -> 'a) -> 'd -> 'e -> ('f -> 'g -> 'b) -> 'f -> 'g -> 'c
OCaml

Innovation. Community. Security.