Ignore:
Timestamp:
08/24/03 17:13:27 (19 years ago)
Author:
piso
Message:

ETYPECASE

File:
1 edited

Legend:

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

    r3431 r3484  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: boot.lisp,v 1.91 2003-08-16 13:24:13 piso Exp $
     4;;; $Id: boot.lisp,v 1.92 2003-08-24 17:13:27 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    216216
    217217
     218(defmacro etypecase (keyform &rest clauses)
     219  (let ((var (gensym)))
     220    `(let ((,var ,keyform))
     221       (typecase ,var
     222         ,@clauses
     223         (otherwise
     224          (error 'type-error "~S fell through ETYPECASE expression" ,var))))))
     225
     226
    218227(defmacro cond (&rest clauses)
    219228  (if (endp clauses)
Note: See TracChangeset for help on using the changeset viewer.