Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chain/1 disappears from iex #100

Open
florius0 opened this issue Jan 10, 2022 · 0 comments
Open

chain/1 disappears from iex #100

florius0 opened this issue Jan 10, 2022 · 0 comments

Comments

@florius0
Copy link
Contributor

If chain/1 is called inside iex session once and I try to call it the second time, Elixir tells that chain/1 does not exist. use Witchcraft or use Witchcraft.Chain fixes it.

Erlang/OTP 24 [erts-12.1.2] [source] [64-bit] [smp:12:12] [ds:12:12:10] [async-threads:1] [jit] [dtrace]

Interactive Elixir (1.12.3) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> use Witchcraft
Witchcraft
iex(2)> chain do
...(2)> [1,2,3]
...(2)> [4,5,6]
...(2)> end
[4, 5, 6, 4, 5, 6, 4, 5, 6]
iex(3)> chain do
...(3)> [1,2,3]
...(3)> [4,5,6]
...(3)> end
** (CompileError) iex:3: undefined function chain/1

iex(3)> use Witchcraft
Witchcraft
iex(4)> chain do
...(4)> [1,2,3]
...(4)> [4,5,6]
...(4)> end
[4, 5, 6, 4, 5, 6, 4, 5, 6]
iex(5)> chain do
...(5)> [1,2,3]
...(5)> [4,5,6]
...(5)> end
** (CompileError) iex:5: undefined function chain/1

iex(5)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant