Partition should always return a list.
This commit is contained in:
		
							parent
							
								
									782442afc8
								
							
						
					
					
						commit
						95fa8dcca9
					
				|  | @ -150,7 +150,7 @@ effectful code, such as logging." | ||||||
|       (if (funcall test x) |       (if (funcall test x) | ||||||
| 	  (push x match) | 	  (push x match) | ||||||
| 	  (push x no-match))) | 	  (push x no-match))) | ||||||
|     (vector match no-match))) |     (list match no-match))) | ||||||
| 
 | 
 | ||||||
| (defun partition-vector (test vec) | (defun partition-vector (test vec) | ||||||
|   (let ((match (new-vector)) |   (let ((match (new-vector)) | ||||||
|  | @ -169,5 +169,4 @@ those that do not satisfy @c(pred)." | ||||||
|   (cond |   (cond | ||||||
|     ((listp seq)   (partition-list pred seq)) |     ((listp seq)   (partition-list pred seq)) | ||||||
|     ((vectorp seq) (partition-vector pred seq)) |     ((vectorp seq) (partition-vector pred seq)) | ||||||
|     (t (error "Values of type ~A cannot be partitioned." |     (t nil))) | ||||||
| 	      (type-of seq))))) |  | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue