IO Language How to create a list that has randomly generated values?

175 Views Asked by At

I am doing a project for my programming languages class. This one is on the IO Language. My question is is it possible to randomly generate values into an empty cloned list? I've been searching their homepage, but can't find the info I am looking for. If anyone has knowledge on this language and could help that'd be great!

1

There are 1 best solutions below

0
On

Use this

GenerateRandomList := method(n,
    newList := list()
    n repeat(
        newList push(Random value)
    )
    newList
)