Changeset 5898


Ignore:
Timestamp:
02/23/04 14:53:06 (17 years ago)
Author:
piso
Message:

Removed remove().

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

Legend:

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

    r5429 r5898  
    33 *
    44 * Copyright (C) 2002-2004 Peter Graves
    5  * $Id: Cons.java,v 1.35 2004-01-09 18:08:48 piso Exp $
     5 * $Id: Cons.java,v 1.36 2004-02-23 14:51:22 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    227227    {
    228228        return NIL;
    229     }
    230 
    231     public LispObject remove(LispObject item) throws ConditionThrowable
    232     {
    233         LispObject result = NIL;
    234         LispObject splice = null;
    235         for (LispObject list = this; list != NIL; list = list.cdr()) {
    236             LispObject obj = list.car();
    237             if (!obj.eql(item)) {
    238                 if (splice == null) {
    239                     splice = new Cons(obj);
    240                     result = splice;
    241                 } else {
    242                     Cons temp = new Cons(obj);
    243                     splice.setCdr(temp);
    244                     splice = temp;
    245                 }
    246             }
    247         }
    248         return result;
    249229    }
    250230
  • trunk/j/src/org/armedbear/lisp/LispString.java

    r5897 r5898  
    33 *
    44 * Copyright (C) 2002-2004 Peter Graves
    5  * $Id: LispString.java,v 1.84 2004-02-23 14:24:47 piso Exp $
     5 * $Id: LispString.java,v 1.85 2004-02-23 14:53:06 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    3838    public LispObject typeOf()
    3939    {
    40         return list2(/*fillPointer < 0 ? Symbol.SIMPLE_STRING :*/
    41                      Symbol.STRING,
    42                      number(capacity()));
     40        return list2(Symbol.STRING, number(capacity()));
    4341    }
    4442
     
    313311    }
    314312
    315     public LispObject remove(LispObject item) throws ConditionThrowable
    316     {
    317         return signal(new LispError("not implemented"));
    318     }
    319 
    320313    private int cachedHashCode;
    321314
  • trunk/j/src/org/armedbear/lisp/Nil.java

    r5445 r5898  
    33 *
    44 * Copyright (C) 2002-2004 Peter Graves
    5  * $Id: Nil.java,v 1.30 2004-01-14 02:23:43 piso Exp $
     5 * $Id: Nil.java,v 1.31 2004-02-23 14:52:15 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    106106    public LispObject elt(int index) throws ConditionThrowable
    107107    {
    108         return signal(new TypeError("ELT: invalid index " + index + " for " + this));
     108        return signal(new TypeError("ELT: invalid index " + index + " for " + this + "."));
    109109    }
    110110
     
    144144    }
    145145
    146     public LispObject remove(LispObject item) throws ConditionThrowable
    147     {
    148         return this;
    149     }
    150 
    151146    public String toString()
    152147    {
Note: See TracChangeset for help on using the changeset viewer.