aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/java/coffee/liz/lambda/bind/ExternalBinding.java
blob: 48959723c071725e6cea9a6eecf9c5224c485439 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package coffee.liz.lambda.bind;

import coffee.liz.lambda.eval.Environment;
import coffee.liz.lambda.eval.Value;

import java.util.function.BiFunction;

/**
 * Interface for external Java functions callable from lambda expressions.
 *
 * <p>
 * Implementations receive the current environment and an argument value, and
 * return a result value.
 */
public interface ExternalBinding extends BiFunction<Environment, Value, Value> {

	/**
	 * Returns the name used to reference this binding in environment.
	 *
	 * @return the binding name
	 */
	String getName();
}