its result if there are no other collecting vars.
for example,
(iter (for arg in '(a b)) (collecting arg)) will automatically return '(a b)
I would like
(iter (for arg in-vector "HI") (joining arg)) to auto return "HI"
Is there something available for this or must i start hacking? Notice that joining joins arbitrary symbols, chars, and string which is not
available currently in iterate as an accumulating clause ( i think...) Also its alwways a string inside iterate, unlike the other clauses which can be coerced to
a different result but are not that way inside the iter loop.
Code: Select all
(defmacro-clause (JOINING str &optional INTO result-var AT (place 'end))
(let ((pl (string place)))
`(for ,result-var
= ,(cond
((equalp pl "end")
`(strcat ,result-var ,str)
)
((equalp pl "start")
`(strcat ,str ,result-var))
(t (error "AT in JOINING must be either start or end")))
)))