An open API service indexing awesome lists of open source software.

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

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"
$ empty

one :: String
one = proj _1 foo

two :: String
two = proj _2 foo
```