mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-09-11 15:26:03 +03:00
lib.fixedPoints: fix rendering of docs for extends
This commit is contained in:
parent
656fc4fb01
commit
baae71c821
@ -145,6 +145,12 @@ rec {
|
|||||||
in fix g
|
in fix g
|
||||||
```
|
```
|
||||||
|
|
||||||
|
:::{.note}
|
||||||
|
The argument to the given fixed-point function after applying an overlay will *not* refer to its own return value, but rather to the value after evaluating the overlay function.
|
||||||
|
|
||||||
|
The given fixed-point function is called with a separate argument than if it was evaluated with `lib.fix`.
|
||||||
|
:::
|
||||||
|
|
||||||
:::{.example}
|
:::{.example}
|
||||||
|
|
||||||
# Extend a fixed-point function with an overlay
|
# Extend a fixed-point function with an overlay
|
||||||
@ -230,13 +236,6 @@ rec {
|
|||||||
|
|
||||||
fix (extends (final: prev: { c = final.a + final.b; }) f)
|
fix (extends (final: prev: { c = final.a + final.b; }) f)
|
||||||
=> { a = 1; b = 3; c = 4; }
|
=> { a = 1; b = 3; c = 4; }
|
||||||
|
|
||||||
:::{.note}
|
|
||||||
The argument to the given fixed-point function after applying an overlay will *not* refer to its own return value, but rather to the value after evaluating the overlay function.
|
|
||||||
|
|
||||||
The given fixed-point function is called with a separate argument than if it was evaluated with `lib.fix`.
|
|
||||||
The new argument
|
|
||||||
:::
|
|
||||||
*/
|
*/
|
||||||
extends =
|
extends =
|
||||||
# The overlay to apply to the fixed-point function
|
# The overlay to apply to the fixed-point function
|
||||||
|
Loading…
Reference in New Issue
Block a user