s7r
I am trying to understand the output that is returned by the console when I define an anonymous function. I haven’t been able to find any answer in this forum yet.
Example:
iex(33)> fn x, y → x + y end
function<13.126501267/2 in :erl_eval.expr/5>
- What is the meaning of the double 13.126501267 ?
Trending in Chat/Questions
Other Trending Topics
Edit: 2026 May 15 - This post is archived.
Mob is alive!!
Main docs: mob v0.7.11 — Documentation
A bit of explanation for the slightly c...
New
Hey, I’m Jesse and I’m the main contributor behind Dexter, a full-featured, lightning-fast Elixir LSP optimized for large codebases. It s...
New
I am happy to introduce the very α version of the new programming language compiled to BEAM.
Welcome Cure.
It has literally three kille...
New
Hobbes is a low-level distributed database for the Elixir programming language.
Hobbes provides a simple, safe, and scalable storage lay...
New
Hi everyone!
The first release candidate for the Expert language server project is now available!
We’ve published a press release detai...
New
A little off-topic, but I feel like people here have a good head on their shoulders.
I used to be quite good at making software. Was luc...
New
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #library
- #deployment
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #elixirconf
- #channels
- #exunit
- #discussion
- #code-sync
- #podcasts
- #javascript
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ai
- #ecto-query
- #elixirconf-us
- #blog-post
- #elixir-ls
- #phoenix_html
- #iex
- #graphql
- #genstage
- #websockets
- #supervisor
- #advent-of-code
- #distillery
- #processes
- #elixirconf-eu
- #api
- #forms
- #metaprogramming
- #hex










Showing Posts 1 to 4- Show Best Posts
- Show All (oldest first)
- Show All (newest first)
NobbZ
What do you mean by “double”? Anyway, there is no meaning in that number. It is opaque., though the
/2indicates arity of the anonymous function.s7r
Sorry, I meant a floating point number when I said “double”. Thanks for the reply!
NobbZ
It’s not double. The dot is just a separator. Similar to as in a PID individual segments have their own meaning, but which is not documented nor necessary to know.
easco
If you look in the Elixir code, in the “inspect” module, you can see that the output is derived from calling
Function.info. CallingFunction.infoon an anonymous function on my machine gives me:So you can see that the inspect value for the function
#Function<7.126501267/1 in :erl_eval.expr/5>consists of the function’sindex,uniqandaritypieces.According to the documentation on
Function.info:Now… having figured all that out, it’s still the case that there’s not much the average user can do with that information (well… the arity is useful metadata) - most folks can treat it as a blob of stuff that uniquely identifies the function.