MAP primitive variant for linked lists