Skip to content

Instantly share code, notes, and snippets.

@emschwar
Created January 6, 2016 17:35
Show Gist options
  • Save emschwar/d18f77a37009f6b55f5f to your computer and use it in GitHub Desktop.
Save emschwar/d18f77a37009f6b55f5f to your computer and use it in GitHub Desktop.
defmodule Foo do
def hi do
hi_priv(1, 1, 1)
end
defp hi_priv(a, b, c) when a == b, b == c do
IO.puts "hi"
end
end
Foo.hi
@emschwar
Copy link
Author

emschwar commented Jan 6, 2016

~/src/conman_elixir$ elixir -v
Erlang/OTP 18 [erts-7.2] [source] [64-bit] [smp:8:8] [async-threads:10] [hipe] [kernel-poll:false] [dtrace]

Elixir 1.2.0

@emschwar
Copy link
Author

emschwar commented Jan 6, 2016

~/src/conman_elixir$ elixir /tmp/foo.exs
** (CompileError) /tmp/foo.exs:6: undefined function defp/3
    /tmp/foo.exs:1: (file)

@uri
Copy link

uri commented Jan 6, 2016

Change the , in the guard to and

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment