Skip to content

Docs for extending #3

@phoe

Description

@phoe

Is there any documentation or pointers for extending this LOOP implementation? For instance, how would one start implementing a hypothetical hash-in iteration clause as shown below?

;;; proposed extension
CL-USER> (let ((hash-table (alexandria:plist-alist '(:a 1 :b 2 :c 3))))
           (loop for (key value) hash-in hash-table 
                 do (print (list key value))))

;;; ...equivalent to this standard CL
CL-USER> (let ((hash-table (alexandria:plist-hash-table '(:a 1 :b 2 :c 3))))
           (loop for key being the hash-key of hash-table using (hash-value value)
                 do (print (list key value))))

;;; ...results in this being printed
(:A 1) 
(:B 2) 
(:C 3) 

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentationenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions