Question: Define a function alwaysFollows of type [ Integer ] - > Bool so that alwaysFollows ( x , y , lst ) is true if

Define a function alwaysFollows of type [Integer]-> Bool so that alwaysFollows (x, y, lst) is true if and only if whenever x occurs in the list Ist, it is always followed by y. Try your function out on
(alwaysFollows ('p,'m', "ipmnotppm"),
alwaysFollows (6,2,[1,4,6,2,8,5,6,2,7,31))
Turn in a listing of the function and the results of the test run.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!