O'Reilly logo
  • Suk Sohn thinks this is interesting:

first1a <- function(x) return(which(x == 1)[1])

From

Cover of The Art of R Programming

Note

??