hydra.lib.lists.Map Maven / Gradle / Ivy
package hydra.lib.lists;
import hydra.compute.Flow;
import hydra.core.Name;
import hydra.core.Term;
import hydra.core.Type;
import hydra.dsl.Expect;
import hydra.dsl.Terms;
import hydra.graph.Graph;
import hydra.tools.PrimitiveFunction;
import java.util.function.Function;
import java.util.List;
import java.util.stream.Collectors;
import static hydra.Flows.bind;
import static hydra.Flows.pure;
import static hydra.dsl.Types.function;
import static hydra.dsl.Types.lambda;
import static hydra.dsl.Types.list;
public class Map extends PrimitiveFunction {
public Name name() {
return new Name("hydra/lib/lists.map");
}
@Override
public Type type() {
return lambda("a", lambda("b",
function(function("a", "b"), list("a"), list("b"))));
}
@Override
protected Function
© 2015 - 2025 Weber Informatics LLC | Privacy Policy