bbodi / notecalc3

NoteCalc is a handy calculator trying to bring the advantages of Soulver to the web.
https://bbodi.github.io/notecalc3/
GNU Affero General Public License v3.0
1.16k stars 43 forks source link

Feature request: keyed lists #49

Open Lucretiel opened 2 years ago

Lucretiel commented 2 years ago

While it's possible to store collections of data in matrices, it would be nice if we could store collections into maps with keys. This allows for convenient aggregate operations:

item counts = [a: 1, b: 2, c: 3, d: 4]
weight per item = 10g

item weights = item counts * weight per item
item weights.d == 40g
bbodi commented 2 years ago

I can do this:

item weights = [1, 2, 3, 4] * 10g 
nth(item weights, 3)       

Unfortunately your exact request is out of scope and I don't think I will implement it, though I keep the issue open.