Re: shorter way of assigning list elements to multiple symbols?

2016-12-24 Thread dean
Thank you very much Danilo On 23 December 2016 at 17:34, Danilo Kordic wrote: > When `continuation' is: > - `list' 3rd becomes 2nd. > - `[quote @ [mapc 'set '[R1 R2 R3] [rest]]]' 3rd becomes 1st. > -- > UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe >

Re: shorter way of assigning list elements to multiple symbols?

2016-12-23 Thread Danilo Kordic
When `continuation' is: - `list' 3rd becomes 2nd. - `[quote @ [mapc 'set '[R1 R2 R3] [rest]]]' 3rd becomes 1st. -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe

Re: shorter way of assigning list elements to multiple symbols?

2016-12-23 Thread Danilo Kordic
Following approaches come to my mind for returning multiple results from a function: 1. (results 'R1 'R2 'R3 ~args) # Pass `var's in which to store results. Like in C. 2. (mapc 'set '(R1 R2 R3) (results ~args)) # Pack results in a Product Type, `list' in this example, and return it. Exactl

Re: shorter way of assigning list elements to multiple symbols?

2016-12-18 Thread dean
Hi Alex >(let ((A B C) (foo)) I am using pil64 so...That's great...Thank you very much indeed Best Regards Dean On 18 December 2016 at 21:05, Alexander Burger wrote: > Hi Dean, > > > I'm sure I can only return multiple values from a function as a list. > > I can assign those values to multiple s

Re: shorter way of assigning list elements to multiple symbols?

2016-12-18 Thread Alexander Burger
Hi Dean, > I'm sure I can only return multiple values from a function as a list. > I can assign those values to multiple symbols in the calling function like > this... > > (setq L (1 100 1000)) > > (setq A (get L 1) B (get L 2) C (get L 3)) Right. > but wonder if there's a shorter way. For t