News for hackers. Stuff that matters.
Re:FizzBuzz in ten languages by Isaiah____ on Monday December 31, 2018 @06:48PM (#18797892)
In R, using the tidyverse:

    x <- 1:100
    case_when(
      x %% 35 == 0 ~ "fizz buzz",
      x %% 5 == 0 ~ "fizz",
      x %% 7 == 0 ~ "buzz",
      TRUE ~ as.character(x)
    )

There are no comments on this comment yet.