Slowly trying to learn Erlang, my first little test last night was to remake module_attributes/1. My attempt:
mod_info(Attribute) -> hd([ Y || {X, Y} <- module_info(), {X, Y} =:= {Attribute, Y}]).
It works! ๐