Skip to content

axionbuster/varcomp

Repository files navigation

varcomp -- Variadic function composition

Variadic function composition done via the .**. operator.

Usage

import Variadic.Composition ((.**.))

-- Simple composition

g :: Char -> String
g = const "hello"

-- One argument

f0 :: Int -> Char
f0 = undefined

h1 :: Int -> String
h1 = g .**. f0

-- Two arguments

f2 :: Int -> Double -> Char
f2 = undefined

h2 :: Int -> Double -> String
h2 = g .**. f2

-- Three arguments

f3 :: Int -> Double -> String -> Char
f3 = undefined

h3 :: Int -> Double -> String -> String
h3 = g .**. f3

About

Variadic function composition (without hacks)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published