htools: Add if' and select as functions
if' is just a functional version of the if-then-else construct. Using it we can manipulate ifs as functions, and also build other functionality. select allows to choose a result depending on truth value of statements, with a final default, and can be used to substitute cascaded-nested if-then-else statements. Both come with unit tests. Signed-off-by:Guido Trotter <ultrotter@google.com> Reviewed-by:
Iustin Pop <iustin@google.com>
Loading
Please register or sign in to comment