Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

As for `delay`... I had to think hard to think why would it be a bad idea and concluded that it is non-standard and can confuse readers. If this is the case then just define a `swap` or `flip` function, along the lines of

    flip f = (a, b) -> f(b, a)
and use it inline:

    flip(setTimeout) 300, -> "it's fun!"
Sweet ;)


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: