Question: buildList Takes an integer N and a Scheme expression E1 (i.e. an atome or a list ) and an integer M and a Scheme Expression

buildList Takes an integer N and a Scheme expression E1 (i.e. an atome or a list ) and an integer M and a Scheme Expression E2 and returns a new list of length M+N where each element is the Expression E1 N times and E2 M times. For example:

( buildList 5 () 3 B ) will return the list ( ( ) ( ) ( ) ( ) ( ) B B B )

( buildList 3 A 2 C) will return ( A A A C C )

( buildList 2 (a b c ) 1 Q) will return ( ( a b c ) ( a b c ) Q)

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 Databases Questions!