logo
  • Search
  • Reddit Posts 🔥
  • Archive
  • GitHub

Python-like list\\dict comprehension macro

137 points AharonSambol 2022-10-18 16:05:08
View on Reddit ↗

I made a macro which lets you write list comprehension just like in Python

Python:

https://preview.redd.it/qdfd0iy1nju91.png?width=445&format=png&auto=webp&s=9f0a4466f95ea865b1be481f1f4dff2a4989799b

Rust:

https://preview.redd.it/y1urx7ymmju91.png?width=515&format=png&auto=webp&s=1079ca9d555f57540126295b3077d1649719c81d

https://crates.io/crates/list\_comprehension\_macro

(Very similar to: https://crates.io/crates/cute)

© 2025 Query.rs, built by Folyd with ❤️❤️, see about page to learn more · meiguo.app · aiberm.com