mdef
mdef copied to clipboard
Support for mdefp
Would it be useful to extend it to also support creation of multiple defp
statements.
It could be as simple as:
mdefp _fred do
{ :init, val } -> _fred {:double, val}
{ :double, val } -> val*2
a, b, c when a < b -> a+b+c
end
Sure, although I'm not seeing much uptake on the concept atm...
On Thu, Aug 14, 2014 at 4:10 PM, Bert Hajee [email protected] wrote:
Would it be useful to extend it to also support creation of multiple defp statements.
It could be as simple as:
mdefp _fred do { :init, val } -> _fred {:double, val} { :double, val } -> val*2 a, b, c when a < b -> a+b+cend
— Reply to this email directly or view it on GitHub https://github.com/pragdave/mdef/issues/1.
Would you be interested in a pull request adding support for it?
Sure On Nov 23, 2014 6:30 AM, "Lennart Fridén" [email protected] wrote:
Would you be interested in a pull request adding support for it?
— Reply to this email directly or view it on GitHub https://github.com/pragdave/mdef/issues/1#issuecomment-64116307.
Thanks, I've opened a PR (https://github.com/pragdave/mdef/pull/2) but could use some help in figuring out how to make it merge-worthy.
I love mdef, and actually manually implemented mdefp (much less elegantly than in your mdefp branch). It would be great if you could merge the mdefp branch with master so it's easier to pull it into my projects. (I know I can add a github branch in mix.exs...)
+1