Viewing version 0.1.0. Open the latest package page.

tuple

0.1.0

Tuple data structure

Download archive

Readme

Tuple data structure

There are two versions of this data structure:

  • mutable [Tuple2], [Tuple3]...
  • persistent [PersistentTuple2], [PersistentTuple3]...

Usage example

final t = new Tuple2<String, int>('a', 10);

print(t.i1); // prints 'a'
print(t.i2); // prints '10'

Persistent Tuple

In computing, a persistent data structure is a data structure that always preserves the previous version of itself when it is modified. Such data structures are effectively immutable, as their operations do not (visibly) update the structure in-place, but instead always yield a new updated structure. (A persistent data structure is not a data structure committed to persistent storage, such as a disk; this is a different and unrelated sense of the word "persistent.")

wikipedia

final t1 = const PersistentTuple2<String, int>('a', 10);
final t2 = t1.setI1('c');
// t2 is a new [PersistentTuple2] object with i1 is 'c' and i2 is 10.
Changelog

Installing

export PUB_HOSTED_URL=https://pub.mirror.p-hatan.ir
flutter pub add 'tuple:0.1.0'
pubspec.yaml
name: tuple
version: 0.1.0
author: Boris Kaul <localvoid@gmail.com>
description: Tuple data structure
homepage: https://github.com/localvoid/tuple
environment:
  sdk: '>=1.6.0'

Version history

VersionPublishedArchiveSHA-256
0.1.0Cached · Upstream SHA-256 matchedDownloada6b04e62…64b3e4
0.1.1Cached · Upstream SHA-256 matchedDownloadb0f98853…a07ef2
0.1.2Cached · Upstream SHA-256 matchedDownload9f07f669…72ce75
0.2.0Cached · Upstream SHA-256 matchedDownload46b86eec…62be3e
0.3.0Cached · Upstream SHA-256 matchedDownload11584629…080ad2
0.4.0Cached · Upstream SHA-256 matchedDownloadf2b00194…3a3e84
1.0.0Cached · Upstream SHA-256 matchedDownload5138b7cf…f0ea30
1.0.1Cached · Upstream SHA-256 matchedDownloada78a7d05…463509
1.0.2Cached · Upstream SHA-256 matchedDownloadbe2c4046…e17017
1.0.3Cached · Upstream SHA-256 matchedDownload2b6a02e9…58b450
2.0.0-nullsafety.0Cached · Upstream SHA-256 matchedDownloade5994eb2…99faf1
2.0.0Cached · Upstream SHA-256 matchedDownloadfe3ae4f0…3b0dd3
2.0.1Cached · Upstream SHA-256 matchedDownload0ea99cd2…60f0aa
2.0.2Cached · Upstream SHA-256 matchedDownloada97ce201…7dd151

Dependencies

No direct dependencies declared.