-
-
Save failshell/fcda156a72c587255838 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
f1 = ['foo', 'bar', 'potato'] | |
f2 = ['foo', 'foobar', 'bar'] | |
puts f1.concat(f2).uniq.inspect | |
puts f1.zip(f2).flatten.compact.uniq.inspect | |
foo = f1 + f2 | |
puts foo.uniq.inspect |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment