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
Get step-by-step solutions from verified subject matter experts
