I propose we extend sequence expressions to handle ranges involving units of measure. Currently we cannot do the following:
let maximumDistance = 3<km>
let minimumDistance = 1<km>
let trials = [ minimumDistance .. maximumDistance ]
The existing way of approaching this problem in F# is to generate a range from bare integers and then map a multiplication to add the dimension
Pros and Cons
The advantages of making this adjustment to F# are
- An improvement to the safety of code by removing error potential in dropping the units and then adding them back
- More concise, readable code
The disadvantages of making this adjustment to F# are
Extra informtion
Estimated cost (XS, S, M, L, XL, XXL):
M? (because of the added complication of min .. step .. max)
Related suggestions: (put links to reated suggestions here)
Allow units of measure in for loops #534
Affadavit (must be submitted)
Please tick this by placing a cross in the box:
Please tick all that apply:
I propose we extend sequence expressions to handle ranges involving units of measure. Currently we cannot do the following:
The existing way of approaching this problem in F# is to generate a range from bare integers and then map a multiplication to add the dimension
Pros and Cons
The advantages of making this adjustment to F# are
The disadvantages of making this adjustment to F# are
Extra informtion
Estimated cost (XS, S, M, L, XL, XXL):
M? (because of the added complication of
min .. step .. max)Related suggestions: (put links to reated suggestions here)
Allow units of measure in for loops #534
Affadavit (must be submitted)
Please tick this by placing a cross in the box:
Please tick all that apply: