Programming Language Theory: Difference between revisions
| Line 85: | Line 85: | ||
Using them, we implement basic conditional logic: | Using them, we implement basic conditional logic: | ||
* <tt>test ≡ λa. λb. λc. a b c</tt> (use <tt>true</tt>/<tt>false</tt> for A. Evaluates to B on <tt>true</tt>, C on <tt>false</tt>) | * <tt>test ≡ λa. λb. λc. a b c</tt> (use <tt>true</tt>/<tt>false</tt> for A. Evaluates to B on <tt>true</tt>, C on <tt>false</tt>) | ||
* <tt>not ≡ λt. t false true</tt> (β-equivalent to <tt> | * <tt>not ≡ λt. t false true</tt> (β-equivalent to <tt>test(A, false, true)</tt>) | ||
====Syntactic sugar==== | ====Syntactic sugar==== | ||