The ALSO construct is the “anti-ELSE”. Instead of running and providing a result if the left hand side missed (e.g. was NULL), it runs when the left hand side was not NULL.
>> case [ 1 < 2 [<foo>] ] also [ print "this runs" <bar> ] == <bar>
So the ALSO is triggered by that non-NULL
<foo>, but then runs and gives
<bar>. What if we just wanted to run some code but not mess with the result, e.g. some kind of check? We’d have to use a lambda to get passed the result:
>> case [ 1 < 2 [<foo>] ] also x => [ print "this runs" <bar> :x ] == <foo>
Can we come up with a good name for a construct that just does that? Run extra code if the left is not null, but pass through the result?
pass doesn’t really carry the full connotation (and even might sound like “ignore” vs. “pass-value-thru”). thus is weird, but a possibility…and it’s 4-letters like ELSE and ALSO and THEN. Though perhaps so could be used as a more abrupt/light version of also?
>> case [ 1 < 2 [<foo>] ] so [ print "this runs" <bar> ] == <foo>
A shorter, but related word. (?) Comments, critiques, better suggestions?