this post was submitted on 22 Oct 2023
12 points (87.5% liked)
General Programming Discussion
7806 readers
1 users here now
A general programming discussion community.
Rules:
- Be civil.
- Please start discussions that spark conversation
Other communities
Systems
Functional Programming
Also related
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
To solve your DRY problem, you may not realize that you can generate target rules from built-in functions
eval
andforeach
and a user-defined new-line macro. Think of it like a preprocessor step.For example:
I winged it a bit for you, but hopefully I got it right, or at least right enough you get what I'm doing with this technique.