summaryrefslogtreecommitdiff
path: root/src/code/1/lists
diff options
context:
space:
mode:
authorkballou <kballou@devnulllabs.io>2016-03-04 15:56:47 -0700
committerkballou <kballou@devnulllabs.io>2016-03-07 15:31:22 -0700
commit3c20dbbdf4ca14fab918576a1479c7aa90196e6e (patch)
tree83be80fb18b20c3440d3e87f8739c6d1780b4223 /src/code/1/lists
parentbc484b7444ff68494b2da7b16ceefb0b1e4a396c (diff)
downloadfunc-w-elixir-3c20dbbdf4ca14fab918576a1479c7aa90196e6e.tar.gz
func-w-elixir-3c20dbbdf4ca14fab918576a1479c7aa90196e6e.tar.xz
Add code examples to presentation
Diffstat (limited to 'src/code/1/lists')
-rw-r--r--src/code/1/lists21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/code/1/lists b/src/code/1/lists
new file mode 100644
index 0000000..836d30b
--- /dev/null
+++ b/src/code/1/lists
@@ -0,0 +1,21 @@
+iex> []
+[]
+iex> [1, 2, 3,]
+[1, 2, 3]
+iex> [1, :a, ['b']]
+[1, :a, ['b']]
+iex> [104, 101, 108, 108, 111]
+'hello'
+iex> 'hełło'
+'hełło'
+iex> 'こにちは、世界'
+[12371, 12395, 12385, 12399, 12289, 19990, 30028]
+
+iex> hd([1, 2, 3,])
+1
+iex> tl([1, 2, 3])
+[2, 3]
+iex> [1] ++ [2, 3]
+[1, 2, 3]
+iex> [1, 2, 3] -- [1]
+[2, 3]