On Mon, Feb 06, 2017 at 12:25:14PM +0100, Alexander Burger wrote: > > I'd like to split a list '(txt1 2 txt2 6.... > > into 2 lists > > '(txt1 txt2... > > and > > '(2 6 > > You could for example filter them: > > (let > (Lst '(txt1 2 txt2 6) > A (filter sym? Lst) > B (filter num? Lst) ) > ... use A and B ...)
It is not clear what you need. If, for example, you want every *second* element, there is a nice trick: : (filter prog2 (1 a 2 b 3 c) '(T NIL .)) -> (1 2 3) : (filter prog2 (1 a 2 b 3 c) '(NIL T .)) -> (a b c) Similarly, you can extract other sequences if you pass the right pattern of NIL's and T's. ♪♫ Alex -- UNSUBSCRIBE: mailto:[email protected]?subject=Unsubscribe
