fix #222 improve the signatures of map(), by(), chain() and
defaultNullElements()