Another way to get the do-it-only-once efficiency would be to Memoize (or cache the results from) the transformation function.
Also known as the Orcish Maneuver, and often more efficient.
In reply to Re^2: When does it pay to use the schwartzian transform?
by BrowserUk
in thread When does it pay to use the schwartzian transform?
by tphyahoo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |