lambda expression documented in source

This commit is contained in:
Daniella / Tove 2022-04-25 12:31:31 +02:00
parent 59f206210a
commit 5fcf560e56

View file

@ -130,6 +130,7 @@ public class ISBPL {
}
return i.get();
};
// Returns closed function (func behaviour)
case "{":
return (idx, words, file, stack) -> {
AtomicInteger i = new AtomicInteger(idx);
@ -137,6 +138,7 @@ public class ISBPL {
stack.push(new ISBPLObject(getType("func"), block));
return i.get();
};
// Returns open function (lambda behaviour)
case "?":
return (idx, words, file, stack) -> {
AtomicInteger i = new AtomicInteger(idx + 1);