zackpi.bsky.social
@zackpi.bsky.social
aw voiddd
February 13, 2025 at 4:20 AM
nice one with the capture groups, I'll have to try that
December 17, 2024 at 5:38 PM
turing complete type system ohgodwhy
December 17, 2024 at 5:37 PM
better yet, it works on arrays of numbers [1,2,3] and arrays of number strings ['1','2','3'], whereas the reduce version needs extra parsing to work with number strings
December 3, 2024 at 3:25 PM
New cursed way to make math one-liners just dropped:
`eval(arr.join("*"))`
...is a bit shorter than:
`arr.reduce((p,v)=>p*v,1)`
I just used this as part of day03

github.com/zackpi/aoc24...
github.com
December 3, 2024 at 3:20 PM
may not be a one-liner, but here's my solution:

github.com/zackpi/aoc24...
github.com
December 3, 2024 at 4:51 AM