query
On this page

withExtend

lib.points.withExtend

Docs pulled from | This Revision | 5 months ago


Nixpkgs manual

Add an extend method to the result of a function.

Type

withExtend :: (a -> b) -> b & { extend :: (a -> b -> c) -> b & c }

Noogle detected

Implementation

The following is the current implementation of this function.

withExtend =
    f:
    let
      create = self: (f self) // { extend = g: lib.points.withExtend (lib.points.extends g f); };
    in
    lib.points.fix' create;