-
Notifications
You must be signed in to change notification settings - Fork 9
Iterable
Iterable values are ordered lists or unordered set that can be iterated through a loop.
Iterables can also be destructured: see Destructuring for more.
An ordered or unordered Markdown list is automatically converted to an ordered collection.
.var {letters}
- A
- B
- C
.foreach {.letters}
.1::lowercase
a
b
c
Nested collections can be represented by nested Markdown lists as well:
.var {letters}
- - A
- B
- - C
- D
- - E
- F
.foreach {.letters}
.1::first
A
C
E
A pair is an iterable of two values.
It may be created via .pair {first} {second}
or retrieved as a Dictionary entry.
When used in a function which requires an iterable, a Dictionary value is used as a list of key-value pairs.
An integer Range
is a valid ordered iterable value.
Assuming myiterable
to be an iterable, the following operations via .myiterable::operation
are valid.
-
getat {index} {orelse?}
(note that indexes start at 1) first
second
third
last
size
sumall
average
distinct
sorted {by?}
reversed
groupvalues
For a complete reference and documentation, please check the Collection
stdlib module.
- Figures
- Image size
- TeX formulas
- Table caption
- Decorative headings
- Alerts (quote types)
- Quotation source
- Page breaks
- Text symbols (text replacement)
- Syntax of a function call
- Declaring functions
- Dynamic typing
- Including other Quarkdown files
- Importing external libraries
- Localization
- Document metadata
- Theme
- Page format
- Page margin content
- Page counter
- Automatic page break
- Numbering
- Table of contents
- Stacks (row, column, grid)
- Container
- Align
- Float
- Clip
- Box
- Collapsible
- Whitespace
- Variables
- Optionality
- Math
- Conditional statements
- Loops
- Let
- Destructuring
- String manipulation
- Table manipulation: sorting, computing, and more
- Generators
- String
- Number
- Markdown content
- Boolean
- None
- Enumeration entry
- Iterable
- Dictionary
- Range
- Lambda
- Size(s)
- Color
- Dynamic
- Paper: abstract, definitions, theorems, and more