Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Programming advice: DRY

Name: Anonymous 2016-10-07 0:29

Don't Repeat Yourself

Coding tip for y'all: Don't Repeat Yourself.

you can't even *call* a function twice. you have to use map
map(f,[x,y]);
much much beter and more functional than
f(x); f(y);

Name: Anonymous 2016-10-07 10:57

>>1
The whole point of functions is so that you can write a routine once and use it at multiple points throughout your program.

Yeah, but instead of typing it out every time you just list all those places (or, rather, the data it should operate) once, right after defining it. Recursion is handled by explicit use of y-combinator or something.

That would make quite an interesting esolang I think.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List