com.github.basking2.sdsai.itrex.functions.ListFunction Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of sdsai-itrex Show documentation
Show all versions of sdsai-itrex Show documentation
An S-Expression inspiried library focused on iterators.
package com.github.basking2.sdsai.itrex.functions;
import com.github.basking2.sdsai.itrex.EvaluationContext;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
/**
* A function that materializes an iterator into a list and returns it.
*
* This is useful in situation where you want to set a variable using the "set" function
* to return a list.
*
* Also, sometimes you want to defer evaluation of a list. In such situations you can make the first
* element be the "list" function which simply returns the following arguments.
*/
public class ListFunction implements FunctionInterface> {
@Override
public List
© 2015 - 2024 Weber Informatics LLC | Privacy Policy