Question: need help with Common Lisp program: TODO Define the function left-shift of a list of digits. Beware! This is a traditional left-shift, which means it's

need help with Common Lisp program:

need help with Common Lisp program: TODO Define the function left-shift of

TODO Define the function left-shift of a list of digits. Beware! This is a traditional left-shift, which means it's equivalent to multiplying by 2. But since we write numbers with the least-significant bit first, we actually shift to the right. (See unit tests below to make you understand the last sentence.) The name is consistent with the shift operation in computers (defun left-shift (1) TODO ;; Here are some unit tests for left-shift. Add at least two more. (0 1 0 0)) (0 1 0)) (0 1 (check-expect (left-shift . (1 0 0)) check-expect (left-shift (1 0)) heck-expect (left-shift (1 e e e 0)) e 0 0)1

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!