khuey
Joined 15 years ago
Karma
8,808
Submissions
1,955
Member since
Mar 6
Joined 15 years ago
This is essentially what has happened in coastal California over the last 60 years.
I discussed this with a coworker earlier this week and the best they were able to come up with was
for &x in input {
out.push(x);
n += (x > threshold) as usize;
out.truncate(n);
}
which works but is ugly af imo.e.g. Fidelity's fund for people planning to retire around 2050 https://fundresearch.fidelity.com/mutual-funds/summary/31579...
If you did check it for accuracy then I don't understand how you compressed months of work into minutes.
Email is username at kylehuey.com.