tuple_dart 1.2.0 copy "tuple_dart: ^1.2.0" to clipboard
tuple_dart: ^1.2.0 copied to clipboard

outdated

A library providing a tuple data structure for Dart

Tuple dart #

A library providing a tuple data structure for Dart.

  • No dependency
  • Easy usage
  • Support tuple2 - tuple8
  • Used by the itertools package

Example #

import 'package:tuple_dart/tuple.dart';
// or import 'package:tuple_dart/tuple_dart.dart';

void print2(Object? first, Object? second) {
  print('$first $second');
}

void main() {
  final tuple = Tuple2('first', 2); // type Tuple2<String, int>
  tuple.apply(print2); // output: "first 2";
  final tuple2 = tuple.withItem2('second'); // type Tuple2<String, String>
  tuple2.apply(print2); // output: "first second";
}

Pub dev

Documentation

Issue tracker

Usage #

import 'package:tuple_dart/tuple.dart';

Features and bugs #

Please file feature requests and bugs at the issue tracker.

3
likes
0
points
4.04k
downloads

Publisher

unverified uploader

Weekly Downloads

A library providing a tuple data structure for Dart

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

More

Packages that depend on tuple_dart