Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.
Sign upIdea - func factory #841
Comments
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
process-bot
Mar 5, 2017
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it!
Here is what to expect next, and if anyone wants to comment, keep these things in mind.
process-bot
commented
Mar 5, 2017
|
Thanks for the issue! Make sure it satisfies this checklist. My human colleagues will appreciate it! Here is what to expect next, and if anyone wants to comment, keep these things in mind. |
This comment has been minimized.
Show comment
Hide comment
This comment has been minimized.
evancz
Mar 9, 2017
Member
You are describing a macro system. The issue tracker is for bugs, not for open-ended design questions. More info in https://github.com/process-bot/contribution-checklist/blob/master/issues.md
|
You are describing a macro system. The issue tracker is for bugs, not for open-ended design questions. More info in https://github.com/process-bot/contribution-checklist/blob/master/issues.md |
philn5d commentedMar 5, 2017
I'm new to elm-lang, seems great so far. I have an idea...
I was looking at svg src and it seems like there's a lot of unnecessarily repeated code as in https://github.com/elm-lang/svg/blob/master/src/Svg.elm perhaps which is more general to other packages as well. If there were a way to define the functions (since they all share the same type) using a function, all of that could go away and you'd don it like this -
Not really sure how it would work, but the idea is there.
Use like this:
Well, I'm not sure about the syntax, but it would eliminate all the repeat function definitions. The map-types or maybe it should be make-funcs should create funcs of the type given across the list of function names.