Changeset 3829


Ignore:
Timestamp:
09/16/03 18:00:18 (18 years ago)
Author:
piso
Message:

Verify that N is a non-negative integer.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/butlast.lisp

    r2281 r3829  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: butlast.lisp,v 1.1 2003-06-11 00:43:20 piso Exp $
     4;;; $Id: butlast.lisp,v 1.2 2003-09-16 18:00:18 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    2323
    2424(defun butlast (list &optional (n 1))
    25   (unless (listp list)
     25  (unless (and (listp list) (typep n '(integer 0)))
    2626    (error 'type-error))
    2727  (unless (null list)
     
    3838
    3939(defun nbutlast (list &optional (n 1))
    40   (unless (listp list)
     40  (unless (and (listp list) (typep n '(integer 0)))
    4141    (error 'type-error))
    4242  (unless (null list)
Note: See TracChangeset for help on using the changeset viewer.