Skip to content

Commit 05f752d

Browse files
author
Mauricio Serna
committedApr 17, 2018
[Add] some collections examples.
1 parent 976e74f commit 05f752d

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
 

‎collections.exs

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Lists
2+
3+
list1 = ["foo", :bar, 42]
4+
list2 = [42, :bar]
5+
6+
IO.puts list1 -- list2
7+
8+
# Tuples
9+
10+
tuple = {3.14, "Canada", "Colombia"}
11+
12+
IO.puts Enum.join(Tuple.to_list(tuple))

0 commit comments

Comments
 (0)
Please sign in to comment.