(define transpose (lambda (mat) (eval (append '(map (lambda lst (apply list lst))) (map (lambda (lst) (append '(list) lst)) mat))))) (define transpose2 (lambda (mat) (if (null? (car mat)) '() (cons (map car mat) (transpose2 (map cdr mat)))))) (define f (lambda () (apply map + '((1 2) (3 4))))) (define last (lambda (lst) (if (null? (cdr lst) (car lst)) (last (cdr lst))))) (define butlast (lambda (lst) (if (null? (cdr lst)) '() (cons (car lst) (butlast (cdr lst)))))) (define-macro aapply (lambda (func . args) (let* ((+end (last args)) (+rest (butlast args)) (+realargs (append (list +rest) +end))) `(quote (,func ,@+realargs)))))