armory 0.1.0-alpha+1 copy "armory: ^0.1.0-alpha+1" to clipboard
armory: ^0.1.0-alpha+1 copied to clipboard

An extended and curated set of data structures and algorithms.

example/example.dart

import 'package:armory/armory.dart';

void main() {
  // Copy on Write List.
  final originalList = List.generate(10, (index) => index);
  final copyOnWriteList = CopyOnWriteList(originalList);

  copyOnWriteList[0] = 100; // Modifying the copy
  print(originalList); // Original list remains unchanged
  print(copyOnWriteList); // Copy on write list reflects the change

  // Immutable Set.
  final aSet = ImmutableSet({1, 2, 3});
  final bSet = ImmutableSet({1, 2, 3});
  print(aSet == bSet); // true, because they are equal
  print(aSet.hashCode == bSet.hashCode); // true, because they are equal
}
0
likes
160
points
0
downloads

Publisher

verified publisherlurey.dev

Weekly Downloads

An extended and curated set of data structures and algorithms.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

meta

More

Packages that depend on armory