Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/axionbuster/varcomp
Variadic function composition (without hacks)
https://github.com/axionbuster/varcomp
design-patterns functional-programming haskell
Last synced: about 2 months ago
JSON representation
Variadic function composition (without hacks)
- Host: GitHub
- URL: https://github.com/axionbuster/varcomp
- Owner: axionbuster
- License: bsd-3-clause
- Created: 2024-12-18T02:36:44.000Z (about 2 months ago)
- Default Branch: master
- Last Pushed: 2024-12-18T03:02:33.000Z (about 2 months ago)
- Last Synced: 2024-12-18T03:25:42.086Z (about 2 months ago)
- Topics: design-patterns, functional-programming, haskell
- Language: Haskell
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# `varcomp` -- Variadic function composition
Variadic function composition done via the `.**.` operator.
## Usage
```haskell
import Variadic.Composition ((.**.))-- Simple composition
g :: Char -> String
g = const "hello"-- One argument
f0 :: Int -> Char
f0 = undefinedh1 :: Int -> String
h1 = g .**. f0-- Two arguments
f2 :: Int -> Double -> Char
f2 = undefinedh2 :: Int -> Double -> String
h2 = g .**. f2-- Three arguments
f3 :: Int -> Double -> String -> Char
f3 = undefinedh3 :: Int -> Double -> String -> Char
h3 = g .**. f3
```