ava/operators-symbols.md

48 lines
1.7 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Operators & Symbols
## Language Level Symbols and Operators
These are reserved.
| Operator | Name |
| ------------------- | ---- |
| `:` | Bind Type to Name |
| `:=` | Bind Value to Name |
| `[...]` | Type Constructor |
| `(...)` | Tuple |
| `{...}` | List or Array |
| `--` | Comment |
| `---` | Docstring |
| `.` | Access Member or Numeric Literal. |
| `???` | Hole |
| `,` | Argument Separator |
| `=>` | Function Type Definition |
| `"..."` | String Literal |
| `*` | Type Constructor Argument |
| `\` | String Escape Sequence |
| `::` | Type Class Membership |
| `<-` | Do Binding |
| `_` | Anonymous Name |
| `@` | Object Metadata Reference |
| <code>&#124;</code> | Type Union |
## Standard Library Operators (Infix)
These are _not_ reserved names, but are worth mentioning.
| Operator | Name |
| ------------------------- | ---- |
| `=` | Equals (Boolean) |
| `!=` | Not Equals (Boolean) |
| `+` | Addition |
| `-` | Subtraction |
| `/` | Division |
| `<` | Division |
| `>` | Division |
| `<=` | Division |
| `>=` | Division |
| `∘` | Function Composition |
| `∧` | Logical AND |
| `` | Logical OR |
| `&&` | Logical AND |
| <code>&#124;&#124;</code> | Logical OR |