by timhwang21 · 8y ago · 0 comments
At least for me, I feel I'd be using this a lot for the boring but common use case of checking for empty arrays and such:
const doSomethingToArr = arr => match (arr) {
[] => whatever,
[x] => whatever,
[x, ...xs] => whatever
}No comments yet.