in java, i often declare lambda fields: ``` Hand...
# getting-started
t
in java, i often declare lambda fields:
Copy code
Handler handler = (req, res) -> {
    res.body("Hello");
};

@FunctionalInterface
public interface Handler {
    void handle(Request request, Response response) throws Exception;
}
is there any way to achieve something similar in kotlin? (also, is it bad practice?)