adewale (owner)

Revisions

gist: 129286 Download_button fork
public
Public Clone URL: git://gist.github.com/129286.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
list := List clone
 
while (list count() < 6,
    n := Number random(1, 50) floor
    if( (list contains( n ) ) == Nil, //true if list doesn't contain n
        list add( n )
    )
)
 
Became:
 
l := List clone
 
while (l size < 6,
    n := Random value(1 50) floor round
    l appendIfAbsent( n )
)
 
l sort print