Hacker News new | ask | show | jobs
by dmitriz 2484 days ago
Is there a way to simplify the `swap` function? E.g. in JavaScript it is just

    swap = (x,y,...rest) => [y,x,...rest]