X-Git-Url: http://git.kpe.io/?p=reversi.git;a=blobdiff_plain;f=utils.lisp;h=92f9f994598d591b5b886fcdc28bbba4fb87735c;hp=8cd387dc1063b78b36cafaa73789a1c40bb94a73;hb=d3d73d3ab232a53d1e625f6f57b712c31d6e0f00;hpb=7e4bfe37534bc2812d2cafabf8487bd165b2d952 diff --git a/utils.lisp b/utils.lisp index 8cd387d..92f9f99 100644 --- a/utils.lisp +++ b/utils.lisp @@ -1,15 +1,15 @@ ;;;;*************************************************************************** ;;;; ;;;; FILE IDENTIFICATION -;;;; +;;;; ;;;; Name: reversi-base.lisp ;;;; Purpose: Basic functions for reversi ;;;; Programer: Kevin M. Rosenberg ;;;; Date Started: 1 Nov 2001 ;;;; -;;;; $Id: utils.lisp,v 1.6 2003/06/12 13:08:43 kevin Exp $ +;;;; $Id$ ;;;; -;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg +;;;; This file is Copyright (c) 2001-2003 by Kevin M. Rosenberg ;;;; ;;;; Reversi users are granted the rights to distribute and use this software ;;;; as governed by the terms of the Lisp Lesser GNU Public License @@ -42,10 +42,10 @@ Like mapcon, but uses append instead of nconc." (apply #'append (mapcar fn list))) -(defun random-nth (seq) - (declare (list seq)) - "Pick a random element out of a sequence." - (nth (random (length seq)) nth)) +(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" @@ -78,9 +78,9 @@ (let ((output (when list (format nil "~A" (car list))))) (dolist (obj (rest list)) (setq output (concatenate 'string output - (format nil "~A" separator) - (format nil "~A" obj)))) + (format nil "~A" separator) + (format nil "~A" obj)))) output)) - +