pure 1.0.0 copy "pure: ^1.0.0" to clipboard
pure: ^1.0.0 copied to clipboard

Functional programming essentials for Dart. Tail call optimization, partial application, memoization, and more.

1.0.0 16.03.2025 #

Added #

  • Comprehensive test suite covering the entire public API.
  • noOp function — returns an empty Stream<T>.
  • memoizeWeak extension — weak-reference-backed memoization for single-argument functions over object keys, allowing cache entries to be garbage collected when the key is no longer reachable.

Changed #

  • Migrated linter from purple_lints to ai_dart_linter.

0.3.0 13.06.2024 #

Added #

  • thunk extension (#6).
  • TaggedRecord base class.
  • A list of primitive functions.

Changed #

  • Required Dart SDK version is now 3.0.0.
  • Updated Recursion trampolines to use Sealed Classes.
  • Make constant extension more flexible (#5)

Fixed #

  • Incorrect hash calculation (#8).

Removed #

  • [BREAKING] Convenience import mixin.

0.2.0 20.03.2022 #

Changed #

  • Change linter from custom config to purple_lints.
  • [BREAKING] Rename memoized to memoize().
  • Expose function typedefs.

Added #

  • Add basic functions – id, negate and others.
  • Document everything.
  • flip extension.
  • curry extension.
  • uncurry extension.
  • constant extension.
  • nullable extension.

0.1.1 19.09.2021 #

  • Hotfix.

0.1.0 19.09.2021 #

  • Initial version.
14
likes
160
points
1.1k
downloads

Documentation

API reference

Publisher

verified publisheryakov.codes

Weekly Downloads

Functional programming essentials for Dart. Tail call optimization, partial application, memoization, and more.

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

meta

More

Packages that depend on pure