(define array (list 1 2 3 4 2 1 2 0 1 0 0)) (let-values ([(x y) (partition (lambda (x) (< x 1)) array)]) (flatten (list x y)))