Ejemplo n.º 1
0
  @Override
  public LispObject typep(LispObject typeSpecifier) {
    if (null == typeSpecifier) {
      return NIL;
    }

    if (typeSpecifier.isSymbol()) {
      if (typeSpecifier == Symbol.LIST) return T;
      if (typeSpecifier == Symbol.CONS) return T;
      if (typeSpecifier == Symbol.SEQUENCE) return T;
      if (typeSpecifier == T) return T;
    } else if (typeSpecifier.isLispClass()) {
      if (typeSpecifier == BuiltInClass.LIST) return T;
      if (typeSpecifier == BuiltInClass.CONS) return T;
      if (typeSpecifier == BuiltInClass.SEQUENCE) return T;
      if (typeSpecifier == BuiltInClass.CLASS_T) return T;
    }
    return NIL;
  }