I am try to create a function with two arguments x and y which creates a list of y times repeated elements X but im getting confused on how to do it which or which method to use i think list compression can do but i want a shorter and simple method for example i want my simple code to be like this
if y = 4
and x = 7
result is list of elements (7, 7, 7, 7)
how can i go about it any ideas?? books links or anything that will give me a clue i tried searching but i have not been lucky
Try this, it’s in Scheme but the general idea should be easy enough to translate to Common Lisp:
EDIT:
Now, in Common Lisp: