6.10

Assignment 5b

home work!

Programming Language BSL

Due Date: Friday at 9:00pm (Week 5)

Purpose Further practice with lists.

Finger Exercises

Graded Exercises

Exercise 4 We know that cons allows us to add a number to the front of a list of numbers. Design its opposite, snoc, that allows us to add a number onto the end of a list of numbers.

Exercise 5 Design a function search-for-string that takes a string and a list of strings, and returns a list containing all the strings in the given list that contain the given string as a substring.

Hint: There are other string-processing functions besides substring; one of them is very useful for this problem. Look up the documentation for substring, and scroll up through the documentation to find a function that might help with checking string containment...