js snippets: bind, apply, currying, iterator, variadic