44454647484950
private static Node functor( String template ) { StringTokenizer st = new StringTokenizer( template, " ()" ); List<Node> terms = new ArrayList<Node>(); while (st.hasMoreTokens()) terms.add( node( st.nextToken() ) ); return new Functor( terms ); }
100101102103104105106
@Override public Node subst( ExecContext c, Bindings<Node, Node> b ) { List<Node> resultTerms = new ArrayList<Node>(); for (NodeTerm t: terms) resultTerms.add( t.subst( c, b ) ); return new Functor( resultTerms ); }