Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions docs/src/modules/fs.md
Original file line number Diff line number Diff line change
Expand Up @@ -113,14 +113,15 @@ Iterator over items in `path`.
**Parameters**:

- `path` (`string`): Input path.
- `opts?` (`{hidden?:boolean,`): recursive?:boolean, follow_links?:boolean,
type?:string} Optional traversal options.
- `opts?`
(`{hidden?:boolean, recursive?:boolean, follow_links?:boolean, type?:string}`):
Optional traversal options.

**Return**:

- `prev?:string):basename:string?,` (`(fun(state:table,`):
type:"file"|"directory"|"link"|"fifo"|"socket"|"char"|"block"|"unknown"?)?
iterator Iterator, or `nil` on failure.
- `iterator`
(`(fun(state:table, prev?:string):basename:string?, type:"file"|"directory"|"link"|"fifo"|"socket"|"char"|"block"|"unknown"?)?`):
Iterator, or `nil` on failure.
- `state` (`table|string`): Iterator state on success, or error message on
failure.

Expand All @@ -141,8 +142,9 @@ Return direct children of a directory.
**Parameters**:

- `path` (`string`): Input path.
- `opts?` (`{hidden?:boolean,`): recursive?:boolean, follow_links?:boolean,
type?:string} Optional traversal options.
- `opts?`
(`{hidden?:boolean, recursive?:boolean, follow_links?:boolean, type?:string}`):
Optional traversal options.

**Return**:

Expand Down
4 changes: 2 additions & 2 deletions docs/src/modules/list.md
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ Sort the list in place.

**Parameters**:

- `comp?` (`fun(a:any,`): b:any):boolean Optional comparison function (defaults
- `comp?` (`fun(a:any, b:any):boolean`): Optional comparison function (defaults
to `nil`).

**Return**:
Expand Down Expand Up @@ -969,7 +969,7 @@ Reduce the list to a single value using an accumulator.

**Parameters**:

- `fn` (`fun(acc:any,`): v:any):any Reducer function.
- `fn` (`fun(acc:any, v:any):any`): Reducer function.
- `init?` (`any`): Optional initial accumulator; for non-empty lists, `nil` or
omitted uses the first item.

Expand Down
6 changes: 3 additions & 3 deletions docs/src/modules/tbl.md
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,7 @@ Return a new table by mapping each key-value pair.
**Parameters**:

- `t` (`table<K,V>`): Input table.
- `fn` (`fun(key:K,`): value:V):T Key-value mapping function.
- `fn` (`fun(key:K, value:V):T`): Key-value mapping function.

**Return**:

Expand Down Expand Up @@ -435,7 +435,7 @@ Call a function for each value in the table.
**Parameters**:

- `t` (`table<K,V>`): Input table.
- `fn` (`fun(value:V,`): key:K) Function invoked for each entry.
- `fn` (`fun(value:V, key:K)`): Function invoked for each entry.

**Return**:

Expand All @@ -461,7 +461,7 @@ Iterate key-value pairs in sorted key order.

**Return**:

- `table<K,` (`fun(table:`): V>, index?: K):(K, V) iterator Sorted pairs
- `iterator` (`fun(table: table<K, V>, index?: K):(K, V)`): Sorted pairs
iterator.
- **value** (`T`)

Expand Down