First note, Discourse is standard markdown, like what is used on github, you can delinate code with:
```elixir
code here
```
And with your code in your post it appears like:
$ elixir -v
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
Elixir 1.3.4
$ cat t.exs
defmodule X do
def y(n, m..p) when n not in m..p, do: IO.puts "OK"
end
$ iex t.exs
Erlang/OTP 19 [erts-8.2] [source] [64-bit] [smp:4:4] [async-threads:10] [hipe] [kernel-poll:false]
** (SyntaxError) t.exs:2: syntax error before: in
(elixir) lib/code.ex:363: Code.require_file/2
The issue is not the not but rather where it is placed. not in Elixir is a pre-fix call, basically it is like a function of not(something) except you can do it as not something. So by putting n not in m..p it is like saying n(not(in m..p)) which makes no sense and does not compile. You are probably wanting not (n in m..p).
For note, I ‘think’ Elixir is adding a not ininfix operator in a version so what you have should work then, but I do not think it is in 1.3, ‘maybe’ 1.4? Speaking of, your Elixir is quite out of date, you should update it to at least 1.4 or newer.
[quote=“OvermindDL1, post:2, topic:5672”]
For note, I ‘think’ Elixir is adding a not in infix operator in a version so what you have should work then[/quote]
It’s in the documentation for v1.5.0-dev Kernel.in/2 (and doesn’t work in 1.4.4).