CSc 404 Assignment 1

Intruder Alert!

Assigned
Due

Jan 16
30 pts
Jan 31

Create a Tom's lisp function distin which takes two arguments, the first an item of any type and the second a list. It returns a new list containing the original items in the original order, with the first argument inserted between each, and at the front and the back. For instance:

lsp>(load "distin.lsp") distin lsp>(distin 'x '(a b c)) (x a x b x c x) lsp>(distin 'y '()) (y) lsp>(distin 'fred '(33)) (fred 33 fred) lsp>(distin '(a b) '(here is a longer list)) ((a b) here (a b) is (a b) a (a b) longer (a b) list (a b))
Place your code in a file which can be read by Tom's Lisp using the load function.

Submission

When your function works, is nicely formatted and documents, submit it using this form.