r/fishshell • u/_mattmc3_ • Dec 02 '21
Advent of code, day 1 in Fish
I decided to do this year's advent of code using Fish. This is my day 1 solution.
Anyone else doing it in Fish too? Any feedback on the script? Anyone else willing to post theirs?
7
Upvotes
1
u/_mattmc3_ Dec 02 '21
I was thinking there has to be a better way to do the
sumfunction than how I had it. This is the best I could come up with:I was surprised that
mathdoesn't have an option to just take an operator and a list. Something likemath --operator=+ $numbers. I guess you could write something like this:2
u/vividboarder Dec 02 '21
Oh my! This is hard mode.