Hacker News new | ask | show | jobs
by geocar 3522 days ago
If we think well, we need to have loops, we might be feeling despair right now, however array languages don't need loops! I can write:

    min test each args
and I can do the same in JavaScript, it's just uglier:

    args.map(test).reduce(function(x,y){return Math.min(x,y)})
Writing in a functional style makes this kind of programming slightly less onerous, but it still feels strange in languages that are a bad fit.