Skip to content

Operations with ranges of integers

Notifications You must be signed in to change notification settings

miquecg/math-ranges-kata

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Math ranges kata

Basics

An integer range can be defined in the following ways:

  • Use brackets [] for inclusive limits
  • Use parenthesis () for non inclusive limits
  • Use curly braces {} for enum lists

All these examples are equivalent:

  • [1, 6]
  • (0, 7)
  • [1, 7)
  • (0, 6]
  • {1, 2, 3, 4, 5, 6}

Proposed exercise

Implement the function get_all_points(Range):

  • [1, 6] → {1, 2, 3, 4, 5, 6}
  • (2, 4) → {3}
  • {1, 2, 3} → {1, 2, 3}

About

Operations with ranges of integers

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages