Skip to content

Instantly share code, notes, and snippets.

@naartjie
Created July 9, 2022 18:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save naartjie/2fce0461d6be86d3415a7b1ffd51d7d7 to your computer and use it in GitHub Desktop.
Save naartjie/2fce0461d6be86d3415a7b1ffd51d7d7 to your computer and use it in GitHub Desktop.
(* lang = F# *)
seq { 1 .. 100 }
|> Seq.map (function
| x when x % 3 = 0 && x % 5 = 0 -> "CracklePop"
| x when x % 3 = 0 -> "Crackle"
| x when x % 5 = 0 -> "Pop"
| x -> x.ToString())
|> Seq.iter (printfn "%s")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment