Flowdock
+(other) public
Register or log in to add new notes.
January 4, 2012
0 thanks

Total Unique Elements from Two Arrays

Simple but thought it was worth mentioning:

( [ 1, 2, 3 ] + [ 3, 4, 5 ] ).uniq    #=> [ 1, 2, 3, 4, 5 ]
January 11, 2012
0 thanks

Total Unique Elements: Set Union

For total unique elements, see set union: http://apidock.com/ruby/Array/|