[erlang-questions] Erlang cons function

Richard Carlsson carlsson.richard@REDACTED
Tue Jan 31 19:26:10 CET 2017

No, it's considered a language primitive, similar to fixed-size tuples
{1,2}. That's not to say that there couldn't be a named function like the
one you looked for, just that there isn't one because there has never been
much of a need for it.


2017-01-31 16:16 GMT+01:00 Garrett Smith <g@REDACTED>:

> Is there a functional reference to the cons operator? Something
> equivalent to this:
>   fun(H, T) -> [H|T] end
> I was hoping for erlang:'|'(H, T) but no dice.
> _______________________________________________
> 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/20170131/a0a03d12/attachment.htm>

More information about the erlang-questions mailing list