diff options
author | Levi Bostian <levi.bostian@gmail.com> | 2015-01-31 20:17:05 -0600 |
---|---|---|
committer | Levi Bostian <levi.bostian@gmail.com> | 2015-01-31 20:17:05 -0600 |
commit | 4f8b687626edc4966b92dd70f1c1f9cc44e408d3 (patch) | |
tree | 390af0b798cee9759806855194fadc524d491f9e | |
parent | 6a416166173ba997b8611c7258c875e1693f0c67 (diff) | |
parent | 5720c56026567ebf3d756ae0e8971565e66ab06d (diff) |
Merge pull request #947 from microamp/elixir-ranges
[elixir/en] Add ranges under 'Basic types'
-rw-r--r-- | elixir.html.markdown | 5 |
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 ## --------------------------- |