Hy – A dialect of Lisp that’s embedded in Python
Can a lisper explain how things like the list comprehension might be implemented? Is it a special control structure that hy knows about or is it something you could implement yourself if it wasn't part of hy?<p><pre><code>    (list-comp
      (, x y)
      (x (range 8)
       y "ABCDEFGH"))
</code></pre>
The fact that data is bound to the variables x and y within the list comprehension - is that a magical thing?<p>I'm probably not explaining it very well but I thought (as a non-lisper) that you can do things like implement new types of control flow directly in lisp. Could you do that here, or has list-comp been coded directly into the language?<p>Edit: just to add - I think this is a cool project. Really enjoying reading through the docs.