query
On this page

getAttrs

lib.attrsets.getAttrs

Docs pulled from | This Revision | 35 minutes ago


Given a set of attribute names, return the set of the corresponding attributes from the given set.

Inputs

names

A list of attribute names to get out of set

attrs

The set to get the named attributes from

Type

getAttrs :: [String] -> AttrSet -> AttrSet

Examples

lib.attrsets.getAttrs usage example

getAttrs [ "a" "b" ] { a = 1; b = 2; c = 3; }
=> { a = 1; b = 2; }

Noogle also knows

Aliases