Emacs' implementation of cl-loop includes support for the for-as-hash part of Common Lisp's loop grammar.
The grammar:
for-as-hash::= var [type-spec] being {each | the}
{{hash-key | hash-keys} {in | of} hash-table
[using (hash-value other-var)] |
{hash-value | hash-values} {in | of} hash-table
[using (hash-key other-var)]}
Example usage:
(loop for key being the hash-keys of #s(hash-table data (1 2 3 4))
do (message "key: %s" key))
However, the docstring for cl-loop does not mention this syntax. I believe it should.
Thanks
Wilfred