How do I create my own primitive? For example an integer that has a range of to 1-10.
EDIT: This came from a task on Rosetta Code.
Defining Primitive Data Types: Demonstrate how to define a type that behaves like an integer but has a lowest valid value of 1 and a highest valid value of 10.
I added it here because I thought it might be useful to others.
1 Answer