Boolean values: Difference between revisions
Content deleted Content added
Added Wren |
No edit summary |
||
Line 1,115: | Line 1,115: | ||
=={{header|LabVIEW}}== |
=={{header|LabVIEW}}== |
||
{{VI solution|LabVIEW_Boolean_values.png}} |
{{VI solution|LabVIEW_Boolean_values.png}} |
||
=={{header|Lambdatalk}}== |
|||
Predefined constants are true and false: |
|||
<lang scheme> |
|||
{if true then YES else NO} |
|||
-> YES |
|||
{if false then YES else NO} |
|||
-> NO |
|||
</lang> |
|||
Following the lambda calculus user defined booleans can be built |
|||
<lang scheme> |
|||
{def TRUE {lambda {:a :b} :a}} |
|||
-> TRUE |
|||
{def FALSE {lambda {:a :b} :b}} |
|||
-> FALSE |
|||
{def IF {lambda {:c :a :b} {:c :a :b}}} |
|||
-> IF |
|||
{IF TRUE yes no} |
|||
-> yes |
|||
{IF FALSE yes no} |
|||
-> no |
|||
</lang> |
|||
=={{header|Lasso}}== |
=={{header|Lasso}}== |