stdlib: add working map implementation