[erlang-questions] Local namespaces in case/try

Jeremey Barrett <>
Tue Jul 10 18:35:46 CEST 2012

...and the begin/end are superfluous (leftovers from another macro), so:

  -define(lets(C), fun() -> C end()).

Obviously new bindings performed inside the ?lets() call do not leak out, but anything already bound is already bound (you're getting a closure).


On Jul 10, 2012, at 10:55 AM, Jeremey Barrett wrote:

> -define(lets(C), begin fun() -> C end() end).

More information about the erlang-questions mailing list