Cool that you’re trying something new out! I also often find prefix arguments a bit unintuitive in my flow.
First of all, you’re right that you could do (eat nil4) to simulate the prefix argument. I do this in a number of my helpers.
For my advice on your code, I think it would be easier to understand if you used a let* block to assign meaningful variable names. I’m writing this from my phone, so it’s hard to give a detailed example, but:
Cool that you’re trying something new out! I also often find prefix arguments a bit unintuitive in my flow.
First of all, you’re right that you could do
(eat nil 4)to simulate the prefix argument. I do this in a number of my helpers.For my advice on your code, I think it would be easier to understand if you used a
let*block to assign meaningful variable names. I’m writing this from my phone, so it’s hard to give a detailed example, but:And so on. This would let you reuse some values, and would also reduce the amount of nesting in your code.
Edit: Missed a few parentheses, fixing syntax highlighting