class GroovyCurvesSupplier implements CurvesSupplier {

    @Override
    public List<Curve> get(Network network) {
        List<Curve> curves = new ArrayList<>();

        Binding binding = new Binding();
        binding.setVariable("network", network);

        ExpressionDslLoader.prepareClosures(binding);
        extensions.forEach(e -> e.load(binding, curves::add));

        GroovyShell shell = new GroovyShell(binding, new CompilerConfiguration());
        shell.evaluate(codeSource);

        return curves;
    }

    public  GroovyCurvesSupplier(Path path);
    public  GroovyCurvesSupplier(Path path, List<CurveGroovyExtension> extensions);

}