Changeset 3791


Ignore:
Timestamp:
09/15/03 05:02:04 (19 years ago)
Author:
piso
Message:

typep()

Location:
trunk/j/src/org/armedbear/lisp
Files:
3 edited

Legend:

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

    r3781 r3791  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Cons.java,v 1.24 2003-09-14 17:36:11 piso Exp $
     5 * $Id: Cons.java,v 1.25 2003-09-15 05:02:04 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4848    public LispObject typep(LispObject typeSpecifier) throws LispError
    4949    {
    50         if (typeSpecifier instanceof Cons)
    51             return CompoundTypeSpecifier.getInstance(typeSpecifier).test(this);
    5250        if (typeSpecifier == Symbol.LIST)
    5351            return T;
     
    5654        if (typeSpecifier == Symbol.SEQUENCE)
    5755            return T;
     56        if (typeSpecifier == Symbol.ATOM)
     57            return NIL;
    5858        return super.typep(typeSpecifier);
    5959    }
  • trunk/j/src/org/armedbear/lisp/LispObject.java

    r3781 r3791  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: LispObject.java,v 1.53 2003-09-14 17:36:11 piso Exp $
     5 * $Id: LispObject.java,v 1.54 2003-09-15 05:01:25 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    4141    public LispObject typep(LispObject typeSpecifier) throws LispError
    4242    {
    43         return typeSpecifier == T ? T : NIL;
     43        if (typeSpecifier == T)
     44            return T;
     45        if (typeSpecifier == Symbol.ATOM)
     46            return T;
     47        return NIL;
    4448    }
    4549
  • trunk/j/src/org/armedbear/lisp/Package.java

    r3634 r3791  
    33 *
    44 * Copyright (C) 2002-2003 Peter Graves
    5  * $Id: Package.java,v 1.41 2003-09-09 12:51:36 piso Exp $
     5 * $Id: Package.java,v 1.42 2003-09-15 04:59:28 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    5555    public LispObject typep(LispObject typeSpecifier) throws LispError
    5656    {
    57         if (typeSpecifier == Symbol.PACKAGE || typeSpecifier == T)
     57        if (typeSpecifier == Symbol.PACKAGE)
    5858            return T;
    59         return NIL;
     59        return super.typep(typeSpecifier);
    6060    }
    6161
Note: See TracChangeset for help on using the changeset viewer.