cute icon indicating copy to clipboard operation
cute copied to clipboard

Macro for Python-esque comprehensions in Rust

Results 10 cute issues
Sort by recently updated
recently updated
newest added

The equivalent of Python's {x for x in iter}.

Third level nested loops are not in the current `crates.io` version, do you think you can publish them?

For example, you can't write `c![(b, a), for &(a, b) in &[(0, 1), (2, 3)]` - the macro asks for a `ident` rather than ` pat`.

It would be nice to be able to write a conditional at any location in the expression, e.g. `c![a + b, for a in some_vec, if a % 5 <...

Consider supporting an arbitrary number of `for` expressions rather than requiring the macro to be extended for each one? This would likely resolve #4, and lead to a fix for...

Docs need some more work, the previous ones were almost a copy-paste of the tests which seemed like bad form. They also didn't pass `cargo test`, so I added harnesses...

The arity `c!` is called with determines the iteration order - `c![(a, b, c), for a in 0..5, for b in 0..5, for c in 0..5]` is iterated differently than...

Documentation tests are not passing at the moment. Documentation need to be rewritten for doc tests to pass.

enhancement

# What Implement Generator Comprehensions # Why Support for lazy evaluation.

enhancement