[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
unpacking a list
From: |
Urs Liska |
Subject: |
unpacking a list |
Date: |
Sat, 28 Nov 2015 09:24:07 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 |
Hi all,
I don't seem to find a way to "unpack" a list. I think I won't explain
the background, but basically what I need is that
(list (list 1 2 3) 4)
becomes
(list 1 2 3 4)
This is a mock-up of my real code:
#(define (func-a)
(list 1 2 3))
#(define (func-b)
(list
(func-a)
4))
#(display (func-b))
What I need is that the call to (func-a) doesn't evaluate to a list but
to its elements.
I have "solved" it by actually using something like
(append (func-a) (list f4))
but I think that's not really clean. I'd prefer directly "unpacking" the
list in situ.
Any suggestions?
TIA
Urs
- unpacking a list,
Urs Liska <=
- Re: unpacking a list, David Kastrup, 2015/11/28
- Re: unpacking a list, Urs Liska, 2015/11/28
- Re: unpacking a list, David Kastrup, 2015/11/28
- Re: unpacking a list, Urs Liska, 2015/11/30
- Re: unpacking a list, Urs Liska, 2015/11/30
- Re: unpacking a list, David Kastrup, 2015/11/30
- Re: unpacking a list, Urs Liska, 2015/11/30
- Re: unpacking a list, David Kastrup, 2015/11/30
- Re: unpacking a list, Urs Liska, 2015/11/30