summaryrefslogtreecommitdiffhomepage
path: root/elixir.html.markdown
diff options
context:
space:
mode:
authorjames sangho nah <sangho.nah@gmail.com>2015-02-01 01:32:21 +1300
committerjames sangho nah <sangho.nah@gmail.com>2015-02-01 01:32:21 +1300
commit5720c56026567ebf3d756ae0e8971565e66ab06d (patch)
tree3ea0256e4f1fb6d470ab913ad228f9c513238a8a /elixir.html.markdown
parentbfac539c9fe8aaf50e26fb4a97b24ad805ac293d (diff)
Add ranges under 'Basic types'
Diffstat (limited to 'elixir.html.markdown')
-rw-r--r--elixir.html.markdown5
1 files changed, 5 insertions, 0 deletions
diff --git a/elixir.html.markdown b/elixir.html.markdown
index 0a20e3df..fb5f183a 100644
--- a/elixir.html.markdown
+++ b/elixir.html.markdown
@@ -91,6 +91,11 @@ string.
<<1,2,3>> <> <<4,5>> #=> <<1,2,3,4,5>>
"hello " <> "world" #=> "hello world"
+# Ranges are represented as `start..end` (both inclusive)
+1..10 #=> 1..10
+lower..upper = 1..10 # Can use pattern matching on ranges as well
+[lower, upper] #=> [1, 10]
+
## ---------------------------
## -- Operators
## ---------------------------