3 ms·
Something like this: https://gist.github.com/hcarvalhoalves/32af119918aa0837e020 https://gist.github.com/hcarvalhoalves/32af119918aa0837e020
by hcarvalhoalves 12y ago
Something like this:
https://gist.github.com/hcarvalhoalves/32af119918aa0837e020 https://gist.github.com/hcarvalhoalves/32af119918aa0837e020
- gamegoblin 12y agoThat fails for something like this: def test(x, y=None): return x assert curry(test)(1) == 1 # fails
- hcarvalhoalves 12y agoI know, I left kwargs as a later exercise. You can still refactor with `partial` though since it accepts kwargs as the third argument.