simpletuple 1.0.0-nullsafety.0 copy "simpletuple: ^1.0.0-nullsafety.0" to clipboard
simpletuple: ^1.0.0-nullsafety.0 copied to clipboard

outdated

A tiny library to handle n-dimensional tuples.

SIMPLE TUPLE 🧮 #

Build Status

Handle tuples of N dimensions! 🧮

About 📚 #

If you know Maths and Python, you know that in both there exists a "data type" called a tuple. I wanted to write a library that handles tuples of dimension n. This is that library.

Installation 📥 #

Adding to your project #

To add Simple Tuple to your project's dependencies, add this line to your project's pubspec.yaml:

From GitHub

depdencies:
  ...
  simpletuple:
    git: git://github.com/iamtheblackunicorn/simpletuple.git

From Pub.dev

depdencies:
  ...
  simpletuple: ^1.0.0-nullsafety.0

The three dots represent anything else that you might have in the dependencies section. Having done that, re-fetch your project's dependencies by running this in the project's root directory:

$ dart pub get

Usage 🔨 #

Importing #

Import the API like this:

import 'package:simpletuple/simpletuple.dart';

API #

class Tuple

A class to represent two-dimensional or n-dimensional tuples.

void add(List

This method adds data to the tuple and populates the data field.

List

This method returns a dynamic list of the tuple's first dimension.

List

This method returns a dynamic list of the tuple's second dimension.

Map<dynamic, dynamic> toMap()

This method tries to convert a two-dimnensional tuple into a {key:value} pair.

List

This method returns the nth dimension of a tuple.

Note 📜 #

  • Simple Tuple 🧮 by Alexander Abraham 🖤 a.k.a. "The Black Unicorn" 🦄
  • licensed under the MIT license
1
likes
0
pub points
0%
popularity

Publisher

verified publisherblckunicorn.art

A tiny library to handle n-dimensional tuples.

Repository (GitHub)
View/report issues

License

unknown (LICENSE)

Dependencies

pedantic

More

Packages that depend on simpletuple