[erlang-questions] Thinking in Erlang

David N Murray <>
Thu Apr 29 01:50:16 CEST 2010


On Apr 29, Richard O'Keefe scribed:

> 	> F(quit).
>
> Whether you return an "object identifier" which can then be
> passed to various functions, or you return a "handler function"
> which can then be passed "messages", is really quite unimportant.
> You can take EITHER approach in Lisp.
> You can take EITHER approach in Erlang.
> You have to pass ONE thing around, either way, with either language.
> You don't "pass" anything "additional".
>

Thanks Richard.  This last example was the way I was thinking about it
in Lisp.  I didn't consider making the function call as carrying something
around.  I think I may be thinking more of scheme where I can do this:

(define q (make-queue 10))
(q elem)

whereas the lisp version would be more along the lines of
(defparameter q (make-queue 10))
(funcall q elem)

Which is exactly what you were pointing out and I though I was trying to
avoid.

Thanks for the tutorial.

Dave



More information about the erlang-questions mailing list