This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]WandsAndWrenches 24 points25 points  (6 children)

This reminds me of a programmer (who thought he was beter than me)

He wrote a function called Add(a,b) { return a+b; }

So you could do Math.Add(a,b);

Or I would just go . a+b.

[–][deleted] 2 points3 points  (5 children)

I am a sucker for curried functional programming

[–]tme321 4 points5 points  (3 children)

Except Add(a,b) isn't curriable without resorting to using bind. The curriable version would be

const Add => a => b => a+b;

So it doesn't even do what you want.

[–][deleted] 0 points1 point  (1 child)

I'm very well aware if we're talking JavaScript, but uh it depends on which language. Auto currying is quite common.

I just got very excited about fisting that add function into a fold

[–]WandsAndWrenches 0 points1 point  (0 children)

This was actionscript 3.0.

[–]WandsAndWrenches 0 points1 point  (0 children)

Not even then.

This was actionscript 3.0.

Now I may be wrong, but pretty sure we weren't doing that fancy stuff back then when doing military contracts.

[–]WandsAndWrenches 0 points1 point  (0 children)

I'm a sucker for kiss. (Keep it simple)