3 ms·
I don't know if you're familiar with pattern matching in general, but you can think of it as a switch-on-crack. The jist of that code is: we're going to look a
by mrkurt 18y ago
I don't know if you're familiar with pattern matching in general, but you can think of it as a switch-on-crack.
The jist of that code is: we're going to look at Sys.argv, which is a list. If it's a two element list, ignore the first element (underscore as "hole") and pass the second element to search, then display the result.
If it's anything else, fail with a nice message.
- mrkurt 18y agoOh, silentbicycle is right. [| ... |] is array syntax, rather than a list.