Option

(option list value argument) -> list-element, or argument

Similar to memq, option examines the list for the first element eq? to value, and returns the element immediately following it. If value does not occur in the list, argument is returned.

Examples:

>> (option '(1 foo 2) foo #f)
:: 2
>> (option '(1 2) foo "test")
:: "test"
>> (option '(1 2) foo (print "test"))
test:: null
>> (option '(1 foo 2 foo 3) foo #f)
:: 2