doUpdate is a boolean meaning it can be true or false. When you make a comparison (e.g >, <, ==) the result is a boolean.
So the author, rather than create a really big and complicated collection of if else statement they are doing the comparisons and assigning them to doUpdate.
That particular line could be rewritten as:
if( doUpdate || value == "Actual" && inItem.state > 0.0){
doUpdate = true
}
else {
doUpdate = false
}
I don’t understand the question. That code is already calling two other reusable functions. You want to create yet another lambda to call those other ones?
You can do it but you have to pass everything that a lambda needs as an argument, this includes other lambdas that need to be called. There is a limit of six arguments to a lambda so that can become a problem. In his case it is almost problem because you have seven arguments you would have to pass: tempLogic, room, value, fixtures, tempOutput, outputItem.
Generally, when one has lambdas that call lambdas I personally treat it as a code smell. There is almost always a better way to code it.
I don’t know what you are trying to “solve” here. You are already using some lambdas here.
Typically a lambda is a good choice when you have lots of separate rules which all do the same thing. In that case you use the lambda so you don’t have to reproduce the code.
Perhaps if you explain a bit more about what exactly you hope to accomplish with lambdas.