Expression | Value | (define gmap (curry-generalized map))
(define li-mapper (gmap li))
(li-mapper (list "one" "two" "three")) | ("<li>one</li>"
"<li>two</li>"
"<li>three</li>") | (gmap li (list "one" "two" "three")) | ("<li>one</li>"
"<li>two</li>"
"<li>three</li>") |
| | Examples of curry generalization of map. Using curry-generalized it is possible to make a li-mapper in an elegant and satisfactory way.
The last row in the table shows that gmap can be used instead of map. Thus, gmap can in all respect be a substitution for map, and
we may chose to redefine the name map to the value of (curry-generalized map).
|