kachayev/fn.py — pull request #57 by Digenis (2014-08-05 15:28:15+00:00)
Title: Bugfix underscore repr

This fixes two bugs in the way ```__repr__``` parses the returned value of ```__str__```.

It splits the result on '=>' but not just on the first valid one. It goes on inside the expression on the right which may contain a literal '=>'.
It also replaces the function arguments with _ but the regex doesn't exhaust the digits of the argument's base. For more than nine arguments, leftover digits from the base remain.

I include test cases for both bugs.

I put them in the same PR branch because they affect the exact same line.