(def span (tst lst) ((afn (a lst) (if (and lst (tst (car lst))) (self (cons (car lst) a) (cdr lst)) (list (rev a) lst))) nil lst))