1. Write a structurally recursive function (prefix-of? 1st1 lst2) that takes two arguments, both flat lists. Either can be the empty list. prefix-of? returns true if 1st2 starts with the items in 1st1...


2.


Write aRACKET code and attach a Snapshot of yourCODE here



1. Write a structurally recursive function (prefix-of? 1st1 lst2) that takes two<br>arguments, both flat lists. Either can be the empty list. prefix-of? returns true if 1st2<br>starts with the items in 1st1 in the same order, and false otherwise. For example:<br>> (prefix-of? '(cs1510 cs1800) '(cs1510 cs1800 cs1520 cs1410))<br>#t<br>> (prefix-of? '(cs1510 cs1800) '(cs1510 cs1520 cs1800))<br>#f<br>The empty list is a prefix of every other list.<br>

Extracted text: 1. Write a structurally recursive function (prefix-of? 1st1 lst2) that takes two arguments, both flat lists. Either can be the empty list. prefix-of? returns true if 1st2 starts with the items in 1st1 in the same order, and false otherwise. For example: > (prefix-of? '(cs1510 cs1800) '(cs1510 cs1800 cs1520 cs1410)) #t > (prefix-of? '(cs1510 cs1800) '(cs1510 cs1520 cs1800)) #f The empty list is a prefix of every other list.

Jun 07, 2022
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here