Skip to content

Instantly share code, notes, and snippets.

@eam
Last active October 6, 2015 01:49
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 eam/46a30eb8a62d5bfdd4df to your computer and use it in GitHub Desktop.
Save eam/46a30eb8a62d5bfdd4df to your computer and use it in GitHub Desktop.
range = offset == 0
? (0..23)
: (offset > 0
? (offset..23)
: (0..(23-offset)))
@eam
Copy link
Author

eam commented Oct 6, 2015

range = offset == 0 ?
  (0..23) :
  (offset > 0 ?
    (offset..23) :
      (0..(23-offset)))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment