Question: Scheme Programming Language Question! I need to build this function in scheme. trimatoms takes a list, possibly containing sublists, and a list of atoms. It

Scheme Programming Language Question!

I need to build this function in scheme.

trimatoms takes a list, possibly containing sublists, and a list of atoms. It returns the list of atoms with the first k atoms of the list removed where k is the number of non-null atoms in the first list. You can write this function without any helper functions.

Example output:

> (trimatoms '(a b c) '(1 2 3 4)) (4) > (trimatoms '(((a)) (b ((c)))) '(1 2 3 4 5)) (4 5) > (trimatoms '(((a)) () () (b ((c)))) '(1 2 3 4 5)) (4 5)

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!