com.github.basking2.sdsai.itrex.functions.functional.CallFlattenedFunction 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.functional;
import com.github.basking2.sdsai.itrex.EvaluationContext;
import com.github.basking2.sdsai.itrex.functions.AbstractFunction1;
import com.github.basking2.sdsai.itrex.functions.FunctionInterface;
import com.github.basking2.sdsai.itrex.iterators.IteratorIterator;
import java.util.Arrays;
import java.util.Iterator;
import static com.github.basking2.sdsai.itrex.iterators.Iterators.mapIterator;
/**
* Call a function with the remaining arguments flattened.
*
* So the given code fragment:
*
*
* {@code
* [callFlattened f [list a b] [list c d]]
* }
*
*
* will result in calling {@code [f a b c d]}.
*/
public class CallFlattenedFunction extends AbstractFunction1, Object> {
@Override
protected Object applyImpl(
final FunctionInterface
© 2015 - 2024 Weber Informatics LLC | Privacy Policy