Skip to content

Instantly share code, notes, and snippets.

View camatcode's full-sized avatar
🛠️
crafting software

Cam Cook camatcode

🛠️
crafting software
View GitHub Profile
iex(1)> defmodule Hello do
...(1)> def do_work(i) when Integer.is_even(i), do: i
...(1)> end
error: cannot invoke remote function Integer.is_even/1 inside a guard
└─ iex:2: Hello.do_work/1
** (CompileError) iex: cannot compile module Hello (errors have been logged)
(elixir 1.18.3) src/elixir_expand.erl:683: :elixir_expand.expand_arg/3
(elixir 1.18.3) src/elixir_expand.erl:615: :elixir_expand.expand_list/5
(elixir 1.18.3) src/elixir_expand.erl:523: :elixir_expand.expand/3