On Sat, Jun 15, 2019 at 11:06:52AM +0200, JmageK wrote:
> I guess the inefficiency of copying the whole lists can be mitigated partially
> by passing a copy of '@ to conc I tested & it works fine across function
> calls. But then may as well use cons solution.
> 
>   (cons (copy'@) (conc (chop "Si")'(@)))

(copy '@) is a no-op. 'copy' only copies the top level *cells* of a *list*. '@'
is a symbol. But with 'cons' it is not needed anyway, as 'cons' makes a new
cell.


> or 
>   (conc (copy '(@)) (chop "Si")'(@))

Yes, this is fine, but why start the whole machinery of 'copy' in (copy '(@))
when just (cons '@) does the same (i.e. create a single new cell with '@' in its
CAR)?

Phew, so many ways to get the same thing ;)

☺/ A!ex

-- 
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Reply via email to