[erlang-questions] noob namespace question
Thu Dec 13 07:25:27 CET 2012
By implication - what I will write has been said.
But I will just spend a second reinforcing this and dispelling any
They can - if you force it into an atom.
On Thu, Dec 13, 2012 at 1:37 AM, Richard O'Keefe <> wrote:
> On 13/12/2012, at 7:14 AM, Rustom Mody wrote:
> > I dont understand. Let me try and be more explicit about my concern.
> > Let h be a higher-order function of one argument (h/1)
> > Now in the call h(foo)
> > How does Erlang know whether foo is a function or an atom?
> For one thing, function names in Erlang are *NOT* atoms.
> They are *PAIRS* <atom>/<arity>. So if you just see an
> atom, it cannot possibly be a function (or the name of a
> function) because there simply is not enough information
> Actually, I told a lie. Function names are
> module:name/arity triples. If you are referring to a
> function in the same module, you can omit the module:
> If you wanted to call h passing it a reference to a local
> function named foo with 3 arguments, you would have to write
> h(fun foo/3).
> In Common Lisp,
> (h 'foo) the atom FOO
> (h foo) value of the variable FOO
> (h #'foo) the function FOO
> erlang-questions mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions