Package org.jatha.dynatype

Examples of org.jatha.dynatype.LispConsOrNil


                    l.add(v);
                if (i == 0 && !(v instanceof StandardLispSymbol)) {
                    quote = true;
                }
            }
            LispConsOrNil res = jatha.makeList(l);
            if (quote)
                res = jatha.makeList(jatha.QUOTE, res);
            return res;
        }
    }
View Full Code Here


   */
  public LispConsOrNil makeList(Collection elements)
  {
    // Use array so as to iterate from the end to the beginning.
    Object[] elArray = elements.toArray();
    LispConsOrNil result = NIL;

    for (int i = elArray.length - 1; i >= 0; i--)
      result = new StandardLispCons(this, (LispValue) (elArray[i]), result);

    return result;
View Full Code Here

   * Returns NIL if no arguments are passed.
   * makeList(NIL) returns (NIL) - a list containing NIL.
   */
  public LispConsOrNil makeList(LispValue... parts)
  {
    LispConsOrNil result = NIL;
    for (int i = parts.length-1 ; i >= 0; i--)
      result = new StandardLispCons(this, parts[i], result);
   
    return result;
  }
View Full Code Here

TOP

Related Classes of org.jatha.dynatype.LispConsOrNil

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.