projects
/
reversi.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r11859: Canonicalize whitespace
[reversi.git]
/
utils.lisp
diff --git
a/utils.lisp
b/utils.lisp
index 29d9a42506ffdf50fa253e658b3ceb48332d40a0..92f9f994598d591b5b886fcdc28bbba4fb87735c 100644
(file)
--- a/
utils.lisp
+++ b/
utils.lisp
@@
-1,7
+1,7
@@
;;;;***************************************************************************
;;;;
;;;; FILE IDENTIFICATION
;;;;***************************************************************************
;;;;
;;;; FILE IDENTIFICATION
-;;;;
+;;;;
;;;; Name: reversi-base.lisp
;;;; Purpose: Basic functions for reversi
;;;; Programer: Kevin M. Rosenberg
;;;; Name: reversi-base.lisp
;;;; Purpose: Basic functions for reversi
;;;; Programer: Kevin M. Rosenberg
@@
-9,7
+9,7
@@
;;;;
;;;; $Id$
;;;;
;;;;
;;;; $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
;;;;
;;;; 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)))
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"
(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
(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))
output))
-
+