Skip to content

Instantly share code, notes, and snippets.

@cowlike
Created February 18, 2018 14:42
Show Gist options
  • Save cowlike/f18cf8778bdda073712285c10c37e000 to your computer and use it in GitHub Desktop.
Save cowlike/f18cf8778bdda073712285c10c37e000 to your computer and use it in GitHub Desktop.
fun mkCycle(min: Int, max: Int) = generateSequence(min) {
if (it < max) it + 1 else min
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment