Haha, I would say we should have some thing that gets Elixir AST and translate them to matchspec but there would be no place to put them in Elixir today. :S But this could be simply written as:

```elixir
matchspec [x, y, z, w],
  not is_binary(x) and
    ({ x, y, z } < { major, minor, patch } or
      ({ x, y, z } == { major, minor, patch } and
        (length(w) < length(pre) or w > pre)))
```