Package erjang

Examples of erjang.ESeq.cons()


       
        ETuple candidate = (ETuple) mape.getValue();
        EObject res;
        if ((res = matcher.match(candidate)) != null) {
          count += 1;
          vals = vals.cons(res);
        }
      }
      if (ordered) vals = vals.reverse();

      if (vals == ERT.NIL) {
View Full Code Here


    }

  public static ESeq getLoaded() {
    ESeq res = ERT.NIL;
    for (String driver : drivers.keySet()) {
      res = res.cons(EString.fromString(driver));
    }
    return res;
  }
}
View Full Code Here

    ESeq res = ERT.NIL;
   
    // no need to run in_tx if we're only reading
    EObject val = (EObject) deref().valAt(key);
    if (val != null) {
      return res.cons(val);
    } else {
      return res;
    }
  }
 
View Full Code Here

  public static ESeq all_ports() {
   
    ESeq res = ERT.NIL;
    for (EDriverTask dt : all_ports.values()) {
      if (dt.isDone()) continue;
      res = res.cons(dt.self_handle());
    }

    return res;
  }
View Full Code Here

  @BIF
 
  static public ESeq get_module_info(EObject mod) {
    // TODO: get all the attributes from the beam code
    ESeq res = ERT.NIL;
    res = res.cons(new ETuple2(ERT.am_compile,
           get_module_info(mod, ERT.am_compile)));

    res = res.cons(new ETuple2(ERT.am_attributes,
           get_module_info(mod, ERT.am_attributes)));
View Full Code Here

    // TODO: get all the attributes from the beam code
    ESeq res = ERT.NIL;
    res = res.cons(new ETuple2(ERT.am_compile,
           get_module_info(mod, ERT.am_compile)));

    res = res.cons(new ETuple2(ERT.am_attributes,
           get_module_info(mod, ERT.am_attributes)));

    res = res.cons(new ETuple2(ERT.am_exports,
           get_module_info(mod, ERT.am_exports)));
View Full Code Here

           get_module_info(mod, ERT.am_compile)));

    res = res.cons(new ETuple2(ERT.am_attributes,
           get_module_info(mod, ERT.am_attributes)));

    res = res.cons(new ETuple2(ERT.am_exports,
           get_module_info(mod, ERT.am_exports)));

    return res;
  }
View Full Code Here

 
  @BIF
  public static ESeq pre_loaded() {
    ESeq res = ERT.NIL;
    for (int i = 0; i < PRE_LOADED_MODULES.length; i++) {
      res = res.cons(EAtom.intern(PRE_LOADED_MODULES[i]));
    }
    return res;
  }

  @BIF
View Full Code Here

   
    ESeq rev = ERT.NIL;
    for (; !seq.isNil(); seq = seq.tail()) {
      arg[0] = seq.head();
      EObject val = fun.invoke(proc, arg);
      rev = rev.cons( val );
    }

    return reverse(rev, ERT.NIL);
  }
 
View Full Code Here

    ESeq l = ERT.NIL;
    int val = sm_e.value;
    int first = sm_s.value;
   
    while (val >= first) {
      l = l.cons(val);
      val -= 1;
    }
   
    return l;
  }
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.