(provide (quote cl)) (defmacro psetq (&rest pairs) "(psetq {VARIABLE VALUE}...): In parallel, set each VARIABLE to its VALUE. All the VALUEs are evaluated, and then all the VARIABLEs are set. Aside from order of evaluation, this is the same as `setq'." (byte-code " G\"\" ! [ @ 9?? !\" BA@BAA% * @ DB BAf + ! @ @BBA A *BF." [nforms pairs symbols forms bindings newsyms assignments i ptr var form newsym ptr1 ptr2 nil /= % 2 0 error "Odd number of arguments to `psetq'" "`psetq' expected a symbol, found '%s'." prin1-to-string gensym nreverse let setq] 11)) (defun pair-with-newsyms (oldforms) "\ PAIR-WITH-NEWSYMS OLDFORMS The top-level components of the list oldforms are paired with fresh symbols, the pairings list and the newsyms list are returned." (byte-code " !?- @D BB)A ) !!\"+" [ptr oldforms bindings newsyms newsym G$$_7 nil endp gentemp values nreverse] 7)) (defun zip-lists (evens odds) "\ Merge two lists EVENS and ODDS, taking elts from each list alternatingly. EVENS and ODDS are two lists. ZIP-LISTS constructs a new list, whose even numbered elements (0,2,...) come from EVENS and whose odd numbered elements (1,3,...) come from ODDS. The construction stops when the shorter list is exhausted." (byte-code " @ @! !?5 BBA A@ @ !-" [p0 evens p1 odds even odd result nil endp nreverse] 6)) (defun unzip-list (list) "\ Extract even and odd elements of LIST into two separate lists. The argument LIST is separated in two strands, the even and the odd numbered elements. Numbering starts with 0, so the first element belongs in EVENS. No check is made that there is an even number of elements to start with." (byte-code " @!!?0 B B!@! ! !\"-" [ptr list this next evens odds cadr nil endp cddr values nreverse] 9)) (defun reassemble-argslists (argslists) "\ (reassemble-argslists ARGSLISTS). ARGSLISTS is a list of sequences. Return a list of lists, the first sublist being all the entries coming from ELT 0 of the original sublists, the next those coming from ELT 1 and so on, until the shortest list is exhausted." (byte-code " \"\"Y?'