make match safe

`String.prototype.match` returns `null` if there is no match. For example:

```javascript
> 'abc'.match(/x/)
null
```

This change is largely copied from #13.

The type `r` in our case is `Maybe [String]`, so `Just` and `Nothing` have type `[String] -> Maybe [String]` and `Maybe [String]` respectively. But looking at the code, there is nothing which _uses_ the fact that the result is of type `Maybe [String]`, all we care about is that 

- `Just(m)` and `Nothing` have the same type.
- `Just` takes an argument of type `[String]`

so we can generalize the result type from `Maybe [String]` to `r` for all `r`.