paulrusso
Joined 11 years ago
Joined 11 years ago
``` [1, 2, 3] * 10 // [10, 20, 30] [10, 20, 30] + 2 // [12, 22, 32] [4, 5, 6] > 3 // [true, true, true] [1, 2] == [2, 2] // [false, true] ```
In addition, I’ve added both `all` and `any` as built-in functions. These can be used to achieve the same result as the previous broadcasting behavior:
``` [4, 5, 6] > 4 into all // false [4, 5, 6] > 4 into any // true
// alternatively: all([4, 5, 6] > 4) // false any([4, 5, 6] > 4) // true ```
Thanks for the feedback!
More broadly, a lot of other command line utils for transforming input have such an emphasis on terseness that I sort of bounce off of them. awk and sed and jq are all super powerful tools, but I wanted a tool that had a more balanced trade-off of characters vs. clarity.