com.github.basking2.sdsai.itrex.functions.CaseListFunction 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 com.github.basking2.sdsai.itrex.iterators.Iterators;
import com.github.basking2.sdsai.itrex.util.TypeConversion;
import java.util.Iterator;
/**
* The `caselist` function is built to work with `case` functions, but this is not necessary.
*
* Find will evaluate each of its arguments, in order, until it _finds_ a result.
*
* A result is _found_ if the argument either evaluates to _true_ or is an interable object
* and its first element evaluates to _true_. In the case of an iterable element, the second
* element in the iterable is returned as the actual result. In the case of a non-iterable,
* then just true is returned.
*
* If nothing is found, then null (not _false_) is returned.
*/
public class CaseListFunction implements FunctionInterface
© 2015 - 2024 Weber Informatics LLC | Privacy Policy