Examples of nth()


Examples of clojure.lang.IPersistentVector.nth()

    } else if (o instanceof IPersistentVector) {
      IPersistentVector v = (IPersistentVector)o;
      if (v.count() != 2) {
        throw new IllegalArgumentException("Vector arg to map conj must be a pair");
      }
      return assoc(v.nth(0), v.nth(1));
    } else {
      DynamicMessage.Builder builder = builder();
      IPersistentMap ext = this.ext;
      for (ISeq s = RT.seq(o); s != null; s = s.next()) {
        Map.Entry<?, ?> e = (Map.Entry<?, ?>)s.first();
View Full Code Here

Examples of clojure.lang.IPersistentVector.nth()

    } else if (o instanceof IPersistentVector) {
      IPersistentVector v = (IPersistentVector)o;
      if (v.count() != 2) {
        throw new IllegalArgumentException("Vector arg to map conj must be a pair");
      }
      return assoc(v.nth(0), v.nth(1));
    } else {
      DynamicMessage.Builder builder = builder();
      IPersistentMap ext = this.ext;
      for (ISeq s = RT.seq(o); s != null; s = s.next()) {
        Map.Entry<?, ?> e = (Map.Entry<?, ?>)s.first();
View Full Code Here

Examples of clojure.lang.IPersistentVector.nth()

       
        // start with expression body
        Expression e = analyse(RT.nth(form, 2));
       
        for (int i=vc-2; i>=0; i-=2) {
          Symbol sym=KissUtils.expectSymbol(v.nth(i));
          Expression exp=analyse(v.nth(i+1));
          e= Let.create(sym, exp, e);
        }
        return e;
      }
View Full Code Here

Examples of clojure.lang.IPersistentVector.nth()

        // start with expression body
        Expression e = analyse(RT.nth(form, 2));
       
        for (int i=vc-2; i>=0; i-=2) {
          Symbol sym=KissUtils.expectSymbol(v.nth(i));
          Expression exp=analyse(v.nth(i+1));
          e= Let.create(sym, exp, e);
        }
        return e;
      }
     
View Full Code Here

Examples of clojure.lang.IPersistentVector.nth()

       
        Symbol[] syms=new Symbol[vc/2];
        Expression[] initials=new Expression[vc/2];
       
        for (int i=0; i<vc; i+=2) {
          syms[i]=KissUtils.expectSymbol(v.nth(i));
          initials[i+i]=analyse(v.nth(i+1));
        }
        Expression body = analyse(RT.nth(form, 2));
        return Loop.create(syms, initials, body);
      }
View Full Code Here

Examples of clojure.lang.IPersistentVector.nth()

        Symbol[] syms=new Symbol[vc/2];
        Expression[] initials=new Expression[vc/2];
       
        for (int i=0; i<vc; i+=2) {
          syms[i]=KissUtils.expectSymbol(v.nth(i));
          initials[i+i]=analyse(v.nth(i+1));
        }
        Expression body = analyse(RT.nth(form, 2));
        return Loop.create(syms, initials, body);
      }
     
View Full Code Here

Examples of clojure.lang.IPersistentVector.nth()

        IPersistentVector v=KissUtils.expectVector(RT.second(form));
        int arity=v.count();
        Symbol[] syms=new Symbol[arity];
        Type[] types=new Type[arity];
        for (int i=0; i<arity; i++) {
          Symbol paramSym=(Symbol)v.nth(i);
          syms[i]=paramSym;
          Type paramType=Type.resolveTag(s);
          types[i]=paramType;
        }
        Expression body=analyse(RT.nth(form, 2));
View Full Code Here

Examples of clojure.lang.IPersistentVector.nth()

    } else if (o instanceof IPersistentVector) {
      IPersistentVector v = (IPersistentVector) o;
      if (v.count() != 2)
        throw new IllegalArgumentException(
            "Vector arg to map conj must be a pair");
      return assoc(v.nth(0), v.nth(1));
    }

    IPersistentMap ret = this;
    for (ISeq es = RT.seq(o); es != null; es = es.next()) {
      Map.Entry e = (Map.Entry) es.first();
View Full Code Here

Examples of clojure.lang.IPersistentVector.nth()

    } else if (o instanceof IPersistentVector) {
      IPersistentVector v = (IPersistentVector) o;
      if (v.count() != 2)
        throw new IllegalArgumentException(
            "Vector arg to map conj must be a pair");
      return assoc(v.nth(0), v.nth(1));
    }

    IPersistentMap ret = this;
    for (ISeq es = RT.seq(o); es != null; es = es.next()) {
      Map.Entry e = (Map.Entry) es.first();
View Full Code Here

Examples of clojure.lang.Indexed.nth()

  @SuppressWarnings("unchecked")
  public boolean nextKeyValue() throws IOException, InterruptedException {
    boolean nextp = super.nextKeyValue();
    if (nextp) {
      Indexed kv = getCurrentRecord();
      key.datum((K) kv.nth(0));
      val.datum((V) kv.nth(1));
    } else {
      key.datum(null);
      val.datum(null);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.