Package erjang

Examples of erjang.ESeq.head()


   
    if (key == null || nth == null | list == null)
        throw ERT.badarg(key, nth_arg, list_arg);

    while (!list.isNil()) {
      EObject elm = list.head();
      ETuple tup = elm.testTuple();

      // test that it is a tuple of the right size
      if (tup != null && tup.arity() >= nth.value) {       
        EObject val = tup.elm(nth.value);
View Full Code Here


   
    if (key == null || nth == null | list == null)
        throw ERT.badarg(key, nth_arg, list_arg);

    while (!list.isNil()) {
      EObject elm = list.head();
      ETuple tup = elm.testTuple();

      // test that it is a tuple of the right size
      if (tup != null && tup.arity() >= nth.value) {       
        EObject val = tup.elm(nth.value);
View Full Code Here

      throw ERT.badarg(k, n, list);
   
    int index = idx.value;

    while (!src.isNil()) {
      EObject elm = src.head();
     
      ETuple tup;
      if ((tup = elm.testTuple()) != null) {
        if (tup.arity() >= index) {
          if (tup.elm(index).equals(k)) {
View Full Code Here

    ArrayList<EObject> map = new ArrayList<>();
    while (!list.isNil()) {
     
      EObject pair0;
     
      proc.arg0 = list.head();
      proc.arg1 = acc;
      proc.tail = fun;     
      do {
        pair0 = proc.tail.go(proc);
      } while (pair0 == EProc.TAIL_MARKER);
View Full Code Here

  public static EAtom member(EObject e, EObject l) {
    ESeq list = l.testSeq();
    if (list == null) throw ERT.badarg(e, l);

    while (!list.isNil()) {
      if (e.equals(list.head())) return ERT.TRUE;
      list = list.tail();
    }

    return ERT.FALSE;
  }
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.