Answered step by step
Verified Expert Solution
Question
1 Approved Answer
IN LISP Define the function my-assoc that takes an atom A and a list L and returns the association pair for A. L is of
IN LISP
- Define the function my-assoc that takes an atom A and a list L and returns the association pair for A. L is of the form ((key1 . value1)(key2 . value2) (keyn . valuen)) Examples:
- (my-assoc 'a nil) --> nil
- (my-assoc 'a '((a . b)(c e f)(b))) --> (a . b)
- (my-assoc 'c '((a . b)(c e f)(b))) --> (c e f)
- (my-assoc 'b '((a . b)(c e f)(b))) --> (b)
I have my-length, my-memq, my-append, and my-attach and can only use
|
|
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started