mirror of
https://github.com/NotAShelf/nvf.git
synced 2026-06-23 13:03:25 +00:00
lib: format nixdoc values
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Some checks are pending
Set up binary cache / cachix (default) (push) Waiting to run
Set up binary cache / cachix (maximal) (push) Waiting to run
Set up binary cache / cachix (nix) (push) Waiting to run
Treewide Checks / Validate flake (push) Waiting to run
Treewide Checks / Check formatting (push) Waiting to run
Treewide Checks / Check source tree for typos (push) Waiting to run
Treewide Checks / Validate documentation builds (push) Waiting to run
Treewide Checks / Validate documentation builds-1 (push) Waiting to run
Treewide Checks / Validate documentation builds-2 (push) Waiting to run
Treewide Checks / Validate documentation builds-3 (push) Waiting to run
Treewide Checks / Validate hyperlinks in documentation sources (push) Waiting to run
Treewide Checks / Validate Editorconfig conformance (push) Waiting to run
Build and deploy documentation / Check latest commit (push) Waiting to run
Build and deploy documentation / publish (push) Blocked by required conditions
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: Ia6dcbf5c44ff6d29e5760111179341226a6a6964
This commit is contained in:
parent
733c182e17
commit
56e20dd9c8
7 changed files with 322 additions and 322 deletions
|
|
@ -2,25 +2,25 @@
|
|||
inherit (builtins) listToAttrs;
|
||||
in {
|
||||
/**
|
||||
Map over a list and convert the result to an attribute set.
|
||||
Map over a list and convert the result to an attribute set.
|
||||
|
||||
# Type
|
||||
# Type
|
||||
|
||||
```
|
||||
mapListToAttrs :: (a -> { name :: String; value :: b }) -> [a] -> AttrSet
|
||||
```
|
||||
```
|
||||
mapListToAttrs :: (a -> { name :: String; value :: b }) -> [a] -> AttrSet
|
||||
```
|
||||
|
||||
# Arguments
|
||||
# Arguments
|
||||
|
||||
- `f`: Function mapping each list element to a `{ name; value }` pair.
|
||||
- `list`: The list to map over.
|
||||
- `f`: Function mapping each list element to a `{ name; value }` pair.
|
||||
- `list`: The list to map over.
|
||||
|
||||
# Example
|
||||
# Example
|
||||
|
||||
```nix
|
||||
mapListToAttrs (x: { name = x; value = x; }) ["a" "b"]
|
||||
=> { a = "a"; b = "b"; }
|
||||
```
|
||||
```nix
|
||||
mapListToAttrs (x: { name = x; value = x; }) ["a" "b"]
|
||||
=> { a = "a"; b = "b"; }
|
||||
```
|
||||
*/
|
||||
mapListToAttrs = f: list: listToAttrs (map f list);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue