[erlang-questions] one-time evaluated functions

Anthony Molinaro anthonym@REDACTED
Mon Oct 30 18:01:01 CET 2017


You can use mochiglobal or a similar trick to do what you want.

https://github.com/mochi/mochiweb/blob/master/src/mochiglobal.erl

-Anthony

> On Oct 30, 2017, at 8:41 AM, Jarosław Preś <jaroslaw.p.75@REDACTED> wrote:
> 
> Hi,
> 
> Is it possible to make an erlang function be evaluated only once at first call and then return this value each time?
> 
> BR/Jarek
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20171030/f1c126cb/attachment.htm>


More information about the erlang-questions mailing list