gusaiani
How do these guards work in elixir_quote.erl?
Hi all,
I like to study Elixir’s source and I don’t know a lot of Erlang.
I got curious about these function declarations as I could not understand how a call to this function would match some guards.
We have in line 137:
dot(Meta, Left, Right, nil) when is_atom(Right) ->
then the next declaration in line 145:
dot(Meta, Left, {Right, _, Context}, nil) when is_atom(Right), is_atom(Context) ->
how does it work that the one in line 145 is ever reached? Same for the one in line 148.
Cheers!
Source here:
Most Liked
NobbZ
{Right, _, Context} is not an atom but a tuple, therefore is_atom/1 returns false.
2
Popular in Chat/Questions
I’m working on the “Bob” exercise on the Elixir Track in Exercism.
I am testing for uppercase letter with this simple check: c in ?A..?Z...
New
Preface: I’m not sure if thise is the right place, because this is not direclty Elixir related… but I’ve always got some of the best advi...
New
A while back, I read a great book by Luis Atencio titled, Functional Programming in JavaScript. In section 7.3, he discusses memoization ...
New
Hello,
I’m trying to learn Phoenix but I constantly find difficult understanding how the framework works, and I think part of this is th...
New
I’m new to elixir. I did some coding in python and C. I want to learn elixir for starting my career in web development. I need suggestion...
New
and what resources you used to learn Elixir?
New
Anybody know of a Pragmatic Studio 40% off coupon code for video course like Phoenix?
New
GenStage and Flow resources?
I have been hearing about GenStage and Flow, a tool built upon it, for quite some time. I understand it allo...
New
Do we have a list of academic/research papers:
about Elixir/Erlang?
that use Elixir/Erlang?
about the Beam?
If so, could you please po...
New
Hi Team
From the title, I am entirely new to programming and i am interested in learning elixir but not sure where to start. Can someone...
New
Other popular topics
I couldn’t find any guides that worked well with Phoenix 1.6.0 and esbuild. I hope this helps people test the waters and eases you into t...
New
I have followed this StackOverflow post to install the specific version of Erlang.
And When I am running mix ecto.setup then getting fol...
New
Hi folks,
Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
New
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine)
This is a plugin that adds support for Elixir to JetBrains IntelliJ...
New
How to set Jason to encode all fields in ecto schema, I don’t care about security and implementing only is taking long list of attributes...
New
I am trying to figure out how Mix knows whether the environment is test, dev, or prod -- where is this set?
Thanks.
New
I have a User schema with a :from_id field set to type :string:
defmodule TweetBot.Repo.Migrations.CreateUsers do
use Ecto.Migration
...
New
About me? ( if you have nothing better to do than reading about some random guy in the internet :stuck_out_tongue: )
Hello all, this is ...
New
Original source of discussion: This topic on the Pragmatic Programmers' Functional Web Development with Elixir, OTP, and Phoenix forum.
...
New
Elixir appears to be a superior language to Python. I don’t see any advantage of Python over Elixir. Are there any?
New







