Tuple data structures.
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
src
test
.gitignore
README.md
fantasy-tuples.js
package.json

README.md

Fantasy Tuples

General

Tuples are another way of storing multiple values in a single value. They have a fixed number of elements (immutable), and so you can't cons to a tuple. Elements of a tuple do not need to be all of the same type!

Example usage:

var tuples = require('fantasy-tuples'),
    Tuple2 = tuples.Tuple2;

Tuple2(1, 2)._1; // 1   

Testing

Library

Fantasy Options uses nodeunit for all the tests and because of this there is currently an existing adapter in the library to help with integration between nodeunit and Fantasy Check.

Coverage

Currently Fantasy Check is using Istanbul for code coverage analysis; you can run the coverage via the following command:

This assumes that you have istanbul installed correctly.

istanbul cover nodeunit -- test/*.js