Add a library function ‘genAttrs’

It generates an attribute set by mapping a function over a list of
attribute names.