(defun pipe-reduce (fn s pipe) (if (pipe-null-p pipe) s (pipe-reduce fn (funcall fn s (head pipe)) (tail pipe))))