Top "Boolean-expression" questions

A boolean expression is an expression in a programming language that produces a boolean value when evaluated, i.e. one of true or false.

DeMorgan's law and C++

For each of the following write the equivalent C++ expressions, without any unary negation operators (!). (!= is still permitted) Use DeMorgan's …

c++ boolean-expression boolean-operations demorgans-law
Parenthesizing a string so that expression takes a given value

The following problem is from the chapter on Dynamic Programming by Vazirani et. al. [6.6]Let us define a multiplication operation(×) …

algorithm dynamic-programming parentheses boolean-expression
When to prefer `and` over `andalso` in guard tests

I am curious why the comma ‹,› is a shortcut for and and not andalso in guard tests. Since I'd call …

erlang short-circuiting boolean-expression
Evaluate many boolean expressions like Array#join in Ruby

In Ruby, you can use Array#join to simple join together multiple strings with an optional delimiter. [ "a", "b", "c" ].…

ruby syntactic-sugar boolean-expression