Question: write following scheme function and make sure it works in Dr.Racket buildList Takes an integer N and a Scheme expression E (i.e. an atome or
write following scheme function and make sure it works in Dr.Racket
buildList Takes an integer N and a Scheme expression E (i.e. an atome or a list ) and returns a new list of length N where each element is the Expression E. For example:
( buildList 5 () ) will return the list ( ( ) ( ) ( ) ( ) ( ) ) ( buildList 3 A ) will return ( A A A ) ( buildList 2 (a b c ) ) will return ( ( a b c ) ( a b c ) )
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
