![]() ![]() We execute the block(p1, p2) function only if both p1 and p2 are not null. The function block decides the return type of the let2() function. block is a function that accepts two not-null arguments and returns a nullable R instance.Īs we can see in the code above, let2() is a generic function, so the two parameters’ ( p1 and p2) types can be different. p1 and p2 are the two nullable parameters. The function let2() has three parameters: p1, p2, and block.
0 Comments
Leave a Reply. |