Exercises in this lecture  previous -- Keyboard shortcut: 'p'        Go to the slide, where this exercise belongs -- Keyboard shortcut: 'u'  

Exercise 2.24
Generation of get-prop


In an earlier exercise we programmed an accessor function, get-prop, on property lists. We encountered the following challenges:

Write a function

(configure-get-prop comparison-function not-found-value)

which returns a get-prop function which uses comparison-function (instead of equal?), which returns not-found-value instead of #f.

Generate the get-prop function from the earlier exercise, and generate new variants. Play with your generated functions, and make sure that they work as intended.


Solution