Package com.googlecode.prolog_cafe.lang

Examples of com.googlecode.prolog_cafe.lang.ListTerm


  }

  private static Term toListTerm(List<Term> terms) {
    Term list = Prolog.Nil;
    for (int i = terms.size() - 1; i >= 0; i--) {
      list = new ListTerm(terms.get(i), list);
    }
    return list;
  }
View Full Code Here


        StructureTerm userTerm = new StructureTerm(
            sym_user,
            new IntegerTerm(a.getAccountId().get()));

        listHead = new ListTerm(
            new StructureTerm(sym_commit_label, labelTerm, userTerm),
            listHead);
      }
    } catch (OrmException err) {
      throw new JavaException(this, 1, err);
View Full Code Here

    ApprovalTypes types = env.getInjector().getInstance(ApprovalTypes.class);

    List<ApprovalType> list = types.getApprovalTypes();
    Term head = Prolog.Nil;
    for (int idx = list.size() - 1; 0 <= idx; idx--) {
      head = new ListTerm(export(list.get(idx)), head);
    }

    if (!a1.unify(head, engine.trail)) {
      return engine.fail();
    }
View Full Code Here

TOP

Related Classes of com.googlecode.prolog_cafe.lang.ListTerm

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.