-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add and/or operations for series #57
Conversation
Btw, Elixir will be fine with invoking |
Hah! Did not know that! Thank you :)! Though I'm running into to trouble on |
Thanks for this! Re: the kernel conflicts, one way I would approach it (and I'm not sure if it's the right way!) is to pattern match and then @spec length(series :: Series.t()) :: integer()
def length(%Series{} = series), do: apply_impl(series, :length)
defdelegate length(other), to: Kernel |
@cigrainger unfortunately that won't work for and/or if used in guards because guards require specific constructs. @drowzy I would try this at the top of the file:
Now every time there is a However, I would use |
@josevalim Thanks for the advice :)! The API definition is update to use |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one thing to fix. The readability of relatively complex guards is definitely taking a hit, but I think it's worth it for the functionality.
Co-authored-by: Christopher Grainger <cigrainger@users.noreply.github.com>
Adds
Explorer.Series.and_/2
&Explorer.Series.or_/2
by usingbitor/and
on the series.closes #56