https://github.com/athanclark/n-tuple
A homogeneous arbitrary-size tuple
https://github.com/athanclark/n-tuple
haskell n-tuple tuples
Last synced: 4 months ago
JSON representation
A homogeneous arbitrary-size tuple
- Host: GitHub
- URL: https://github.com/athanclark/n-tuple
- Owner: athanclark
- License: bsd-3-clause
- Created: 2017-06-06T23:44:22.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-09-26T18:44:52.000Z (over 1 year ago)
- Last Synced: 2025-01-28T16:44:07.297Z (4 months ago)
- Topics: haskell, n-tuple, tuples
- Language: Haskell
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# n-tuple
This is a silly implementation of "homogeneous n-length tuples" -- basically
an array. Internally, it builds a `Vector`, and projections just pull that index.```haskell
{-# LANGUAGE DataKinds -#}import Data.NTuple
foo :: NTuple 3 String
foo
= incl _3 "three"
. incl _2 "two"
. incl _1 "one"
$ emptyone :: String
one = proj _1 footwo :: String
two = proj _2 foo
```