Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class RandomSequence
- def initialize(limit,num)
- @limit,@num = limit,num
- end
- def each
- @num.times { yield (rand * @limit).floor }
- end
- end
- n = RandomSequence.new(10,4)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement