Skip to content

Commit fd1e0bb

Browse files
author
José Valim
committed
Move bitwise examples down
1 parent eb84fa0 commit fd1e0bb

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: getting-started/case-cond-and-if.markdown

+3-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,6 @@ Elixir imports and allows the following expressions in guards by default:
6262
* arithmetic unary operators (`+`, `-`)
6363
* the binary concatenation operator `<>`
6464
* the `in` operator as long as the right side is range or a list
65-
* all operators in the`Bitwise` module (`bnot`, `~~~`, `band`, `&&&`, `bor`, `|||`, `bxor`, `^^^`, `bsl`, `<<<`, `bsr`, `>>>`)
6665
* all the following type check functions:
6766
* `is_atom/1`
6867
* `is_binary/1`
@@ -99,7 +98,9 @@ Elixir imports and allows the following expressions in guards by default:
9998
* `trunc(number)`
10099
* `tuple_size(tuple)`
101100

102-
Additionally, users may define their own guard functions, usually starting with "is_".
101+
Additionally, users may define their own guards. For example, the `Bitwise`
102+
module defines guards as functions and operators: `bnot`, `~~~`, `band`,
103+
`&&&`, `bor`, `|||`, `bxor`, `^^^`, `bsl`, `<<<`, `bsr`, `>>>`.
103104

104105
Note that while boolean operators such as `and`, `or`, `not` are allowed in guards,
105106
the more general and short-circuiting operators `&&`, `||` and `!` are not.

0 commit comments

Comments
 (0)