- Incredible insight! However, comprehensions are still more expressive than the
with
statement as they allow combination between generators. This is the main reason I am trying to learn comprehensions.with
statements execute 1 function at a time, while comprehension are like nestedflat_map
s. They overlap in some cases, but comprehensions are extensible. I just need to understand how to harness that. - I am no stranger to witchcraft, however, after many tries, I can’t get the easiest example going. It also doesn’t help that I need to use their own
macros
and that their types are not compatible with Elixir’s comprehension. But you claim otherwise, right? Could you please, please, please provide an example of witchcraft’s option type with Elixir’s native comprehension? (if that is possible)
2 Likes