Time remaining:
Lisp sublist

Programming
Tutor: None Selected Time limit: 0 Hours


Using Lisp write a simple pattern matching program. Define a sublist function that takes two lists as arguments. It will return true (T) and all sublist indices if the first list appears as a contiguous sub list somewhere within the second list, and false (f) otherwise.

For example: (sublist '(c d e) '(a b c d e c d e f g)) ==> T 2 5 

             (sublist '(a c e) '(a b c d e f g)) ==> F 

             (sublist '(f) '(a b c d e f g)) ==> T 5


Nov 9th, 2013
i can help
Nov 9th, 2013

Studypool's Notebank makes it easy to buy and sell old notes, study guides, reviews, etc.
Click to visit
The Notebank
...
Nov 9th, 2013
...
Nov 9th, 2013
Dec 5th, 2016
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer