I'm new to F # and I wonder how I'm going to flatten the list.
Essentially in the database I store a record with the range min_age and max_age (for brevity, this is a dummy example - I don't mind!). My fields look something like this:
ID, Cost, Savings, min_age, max_age
I essentially have an F # class that acts as a one-to-one mapping with this table โ that is, all properties map exactly to the database fields.
What I would like to do is smooth this range. So, instead of a list containing such items:
saving_id = 1, cost = 100, savings = 20, min_age = 20, max_age = 26
saving_id = 2, cost = 110, savings = 10, min_age = 27, max_age = 31
I need a list containing the following items:
saving_id = 1, cost = 100, savings = 20, age = 20
saving_id = 1, cost = 100, savings = 20, age = 21
etc.
saving_id = 2, cost = 110, savings = 10, age = 27
saving_id = 2, cost = 110, savings = 10, age = 28
etc.
Is there a built-in mechanism for smoothing the list this way and / or does anyone know how to achieve this? Thanks in advance,
In JP