3939import java .util .Date ;
4040import java .util .Map ;
4141import java .util .Objects ;
42- import java .util .function .Supplier ;
42+ import java .util .function .Function ;
4343
4444/**
4545 * An all-in-one jamplate processor.
@@ -441,7 +441,7 @@ public static boolean execute(@NotNull Environment environment, @Nullable Compil
441441 Objects .requireNonNull (environment , "environment" );
442442 Objects .requireNonNull (compilations , "compilations" );
443443 //noinspection OverlyLongLambda
444- return Jamplate .execute (environment , () -> {
444+ return Jamplate .execute (environment , compilation -> {
445445 Memory memory = new Memory ();
446446
447447 Object memoryDefaults = environment .getMeta ().get (Meta .MEMORY );
@@ -506,7 +506,7 @@ public static boolean execute(@NotNull Environment environment, @Nullable Compil
506506 * @since 0.2.0 ~2021.05.31
507507 */
508508 @ Contract (mutates = "param1,param2" )
509- public static boolean execute (@ NotNull Environment environment , @ NotNull Supplier < Memory > memorySupplier , @ Nullable Compilation @ NotNull ... compilations ) {
509+ public static boolean execute (@ NotNull Environment environment , @ NotNull Function < Compilation , Memory > memorySupplier , @ Nullable Compilation @ NotNull ... compilations ) {
510510 Objects .requireNonNull (environment , "environment" );
511511 Objects .requireNonNull (compilations , "compilations" );
512512 boolean success = true ;
@@ -515,7 +515,7 @@ public static boolean execute(@NotNull Environment environment, @NotNull Supplie
515515 Instruction instruction = compilation .getInstruction ();
516516
517517 if (instruction != null ) {
518- Memory memory = memorySupplier .get ( );
518+ Memory memory = memorySupplier .apply ( compilation );
519519
520520 try {
521521 memory .pushFrame (new Frame (instruction ));
0 commit comments