fix bug, function tr

Sorry, I found a big bug in my code, ``tr``, not passing the function given to ``map``.