;;;; Programer: Kevin M. Rosenberg
;;;; Date Started: 1 Nov 2001
;;;;
-;;;; $Id: utils.lisp,v 1.5 2003/06/12 12:42:13 kevin Exp $
+;;;; $Id$
;;;;
;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg
;;;;
Like mapcon, but uses append instead of nconc."
(apply #'append (mapcar fn list)))
-(defun random-elt (seq)
- "Pick a random element out of a sequence."
- (elt seq (random (length seq))))
+(defun random-nth (list)
+ (declare (list list))
+ "Pick a random element out of a list."
+ (nth (random (length list)) list))
(defun concat-symbol (&rest args)
"Concatenate symbols or strings to form an interned symbol"