[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
In cases where a deconstructions would be needed to apply the same function to both sides of a pair, the overhead can be avoided by means of a property of the virtual machine intended for that purpose.
A silly
definition of fan
implying the following theorem is
helpful in expressing such an application.
[[fan
]] f
= ((nil,nil),((nil,f),(nil,nil)))
The virtual machine recognizes when an application has the form shown
above, and uses f
as a function to be applied to both sides
of the argument.
([[fan
]] f
) (x,y)
= (f x,f y)
This document was generated on December 10, 2012 using texi2html 1.82.