set_builder
A procedural macro to create Iterators over a set defined by Haskell-inspired set-builder notation.
It should be noted that these "sets" are not true sets in the sense that there is no guarantee that the members (elements) of the set are unique.
Syntax
Complex Set
// The pattern of the binding(s)
// │
// Mapping │ ┌── Expression that evaluate into types implementing `IntoIterator`.
// expression │ │
// │ │ │ ┌─ Predicate that evaluates to `bool`
// ▼ ▼ ▼ ▼
set!
Simple Enumeration Set
This is only provided for mathematical parity and returns arrays rather than Iterators,
array syntax [...]
should always be preferred to this.
// ┌─ Values to put in the set
// ▼
set!
Examples
use set;
// Single-binding set with a predicate
let set = set!;
assert_eq!;
// Cartesian product without a predicate
let set = set!;
assert_eq!;
// Simple enumeration
let set = set!;
assert_eq!;