Noogλe

search input

Function of the day

  • Takes 2 arguments

    attr, list

    Collect each attribute named attr from a list of attribute sets. Sets that don't contain the named attribute are ignored.

    Inputs

    attr

    The attribute name to get out of the sets.

    list

    The list of attribute sets to go through

    Type

    catAttrs :: String -> [{ [String] :: a }] -> [a]
    

    Examples

    lib.attrsets.catAttrs usage example

    catAttrs "a" [{a = 1;} {b = 0;} {a = 2;}]
    => [1 2]