You have problems, and we're glad to hear them. Explain the problem, what you have tried, and where you got stuck.Feel free to share a little info on yourself and the course.

Forum rules
Please respect your teacher's guidelines. Homework is a learning tool. If we just post answers, we aren't actually helping. When you post questions, be sure to show what you have tried or what you don't understand.

I'm not aware of any library function that performs that directly, but it can be accomplished fairly easily if you break it down into manageable steps.

It appears that your input is a list in the form: (item1 item2 item3)and each of the items will be either a list of atoms: (atom1 atom2 atom3) or a list that contains sublists:(sublist1 sublist2)

First you will need to devise a way to determine whether an item contains any (sub)lists. In Scheme you can achieve this with (member #t (map list? item)) .

You then can loop over each of the items, and based on whether the item contains sublists or atoms, you will either want to append the item to your accumulated result (thus flattening the item by one level), or cons it to the result (leaving it an unflattened list of atoms). This can be accomplished using fold in Scheme or reduce in Lisp.