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 (5 months ago)
- Default Branch: master
- Last Pushed: 2024-12-25T15:04:33.000Z (5 months ago)
- Last Synced: 2025-02-13T15:49:41.088Z (4 months ago)
- Topics: design-patterns, functional-programming, haskell
- Language: Haskell
- Homepage:
- Size: 15.6 KB
- 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 -> String
h3 = g .**. f3
```