I was exploring more on the simple if() function. Ideally the function is writte

I was exploring more on the simple if() function. Ideally the function is written with three parameters
for e.g:- if(condtion,valueiftrue,valueiffalse), but to my surprise I found that following expression is also legitimate
fn!if( false(), true(), false(), 1, 2, 1, 2) and this will return 1 ; also I found if() can accept any number of parameters provided the number of parameters is odd. Can somebody throw more insight into these nuances of if() function. Are there any other interesting functions which can be made very powerful lik this.

OriginalPostID-150245

OriginalPostID-150245

  Discussion posts and replies are publicly visible

Parents Reply Children
No Data