fold
Folds the Terms in terms from left to right, creating binary structures having operator as functor. Let f be the value of operator, and let t_i be the i-th term in terms. Then, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n-1, t_n) ...))Of course, this method will return an instance of either Tuple in case the argument operator is adequate.
Return
Parameters
Throws
if terms has less than 2 items
Folds the Terms in terms from left to right, creating binary structures having operator as functor. Let f be the value of operator, and let t_i be the i-th term in terms. Then, if terminal is non-null, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n, T) ...))where T is the value of terminal, and t_n is the last item in terms. Conversely, if terminal is null, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n-1, t_n) ...))Of course, this method will return an instance of either List, or Tuple in case the arguments operator and terminal are adequate.
Return
Parameters
Throws
if terms has less than 2 items
Folds the Terms in terms from left to right, creating binary structures having operator as functor. Let f be the value of operator, and let t_i be the i-th term in terms. Then, if terminal is non-null, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n, T) ...))where T is the value of terminal, and t_n is the last item in terms. Conversely, if terminal is null, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n-1, t_n) ...))Of course, this method will return an instance of either List, or Tuple in case the arguments operator and terminal are adequate.
Return
Parameters
Throws
if terms has less than 2 items
Folds the Terms in terms from left to right, creating binary structures having operator as functor. Let f be the value of operator, and let t_i be the i-th term in terms. Then, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n-1, t_n) ...))Of course, this method will return an instance of either Tuple in case the argument operator is adequate.
Return
Parameters
Throws
if terms has less than 2 items
Folds the Terms in terms from left to right, creating binary structures having operator as functor. Let f be the value of operator, and let t_i be the i-th term in terms. Then, if terminal is non-null, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n, T) ...))where T is the value of terminal, and t_n is the last item in terms. Conversely, if terminal is null, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n-1, t_n) ...))Of course, this method will return an instance of either List, or Tuple in case the arguments operator and terminal are adequate.
Return
Parameters
Throws
if terms has less than 2 items
Folds the Terms in terms from left to right, creating binary structures having operator as functor. Let f be the value of operator, and let t_i be the i-th term in terms. Then, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n-1, t_n) ...))Of course, this method will return an instance of either Tuple in case the argument operator is adequate.
Return
Parameters
Throws
if terms has less than 2 items
Folds the Terms in terms from left to right, creating binary structures having operator as functor. Let f be the value of operator, and let t_i be the i-th term in terms. Then, if terminal is non-null, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n, T) ...))where T is the value of terminal, and t_n is the last item in terms. Conversely, if terminal is null, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n-1, t_n) ...))Of course, this method will return an instance of either List, or Tuple in case the arguments operator and terminal are adequate.
Return
Parameters
the vararg array of Terms to be folded
Throws
if terms has less than 2 items
Folds the Terms in terms from left to right, creating binary structures having operator as functor. Let f be the value of operator, and let t_i be the i-th term in terms. Then, this method constructs the Structure
f(t_1, f(t_2, ... f(t_n-1, t_n) ...))Of course, this method will return an instance of either Tuple in case the argument operator is adequate.
Return
Parameters
the vararg array of Terms to be folded
Throws
if terms has less than 2 items