Clean (unbind) variables in iex?

In erlang erl/werl we can use

f().

but i can not find the same command in iex

how clean variables in iex ?

regards,

2 Likes

I don’t think iex added f/0/f/1 because you can already redefine variables, which you could do in the erlang shell too. It is good to wipe the variables you’ve made though such as to make sure not copy/pasting something wrong.

You should open a PR on the elixir github to add it, or at the very least an Issue. :slight_smile:

1 Like

if i use

respawn

in iex – is that similar to

f().

in erl/werl or not?

I was about to ask the same…I guess respawn() is the closest thing as it:

Respawns the current shell by starting a new shell process.

https://hexdocs.pm/iex/IEx.Helpers.html#respawn/0

3 Likes