Permalink
Browse files

Operações de conjuntos com array

  • Loading branch information...
1 parent 5402778 commit 5c7b1f1b82fb63e80bca8adedeca557fa115c0e2 @andersondias committed Aug 30, 2010
Showing with 12 additions and 1 deletion.
  1. +12 −1 7_arrays.rb
View
@@ -76,4 +76,15 @@
puts arr.uniq
puts arr
arr.uniq!
-puts arr
+puts arr
+
+#7 -> concat, +, -
+
+arr = [1,2]
+puts arr + [3,4]
+puts arr
+arr.concat [3,4]
+puts arr
+arr = arr - [2,4]
+puts arr
+

0 comments on commit 5c7b1f1

Please sign in to comment.