Skip to content
Snippets Groups Projects
Commit 5049201a authored by Christopher Schankula's avatar Christopher Schankula :earth_africa:
Browse files

more comments on lambda example

parent 3d72e63b
No related branches found
No related tags found
No related merge requests found
......@@ -14,11 +14,13 @@ public class TestLambdas {
BinaryIntExpression b4;
int result;
//specify the instances of the functions
//specify the instances of the functions (these implicitly become the "eval()" function)
//single-line examples:
b0 = (a1, a2) -> a1 + a2;
b1 = (a1, a2) -> a1 - a2;
b2 = (a1, a2) -> a1 * a2;
b3 = (a1, a2) -> a1 / a2;
//multi-line examples
b4 = (a1, a2) -> {
int n = a1 * a2;
n = n * a1 + a2;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment