A dime for a nickle - use the power of the "or"

Started by newdep, April 28, 2008, 02:35:13 PM

Previous topic - Next topic

newdep

When you always want to have a return value of 'true

even though the result is 'nil use the power of the "or"





(and

 (I-return-true)

 (or (I-could-return-nil-function) 'true)

 (i-could-be-next))





That will always return true!



Why this stupid trick?



... depends on your way of programming,

but if you use a lot of "and' , "when" to compare results

its sometimes needed to force a 'true to make sure the

whole evaluation is completed, instead of popping out at 'nil.





;-)
-- (define? (Cornflakes))