(defun pipe-permutations (p1) (if (pipe-null-p p1) (make-pipe nil empty-pipe) (pipe-mappend (lambda (e) (pipe-map (lambda (p) (make-pipe e p)) (pipe-permutations (pipe-filter (lambda (f) (not (eq e f))) p1)))) p1)))