aboutsummaryrefslogtreecommitdiff
path: root/core/src/main/java/coffee/liz/lambda/bind/ExternalBinding.java
blob: 7a8ae40371f812a2a89d0e6db94d8b2c477e2ff9 (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();
}