Slices and loops
closed
S
Stephen Orens
I would like to set a variable to a number of values as in the case of a slice.
LEVEL = [1, 2, 3]
Later calculations that reference LEVEL would provide a slice showing all the results
DIFFICULTY = LEVEL + 1 | [2, 3, 4]
Another related feature, being able to feed individual values from the Slice to a series of functions.
LEVEL = [1,2,3]
LEVEL.each |l|
TEST = l * 1.2
end
The subtotal display would need a clever way to show the individual values for each line in the "loop" and then repeat. maybe use the same color for each repeat line?
Zac @ Soulver
closed
I think this is beyond the scope of what I want to do with Soulver. Swift Playgrounds could be a great tool for a Soulver-like environment to do this kind of data structure manipulation.
S
Stephen Orens
Zac @ Soulver: Fair enough! I was mostly thinking of financial scenarios. Like a low, middle and high-end case. I often use Soulver for some simple financial modeling for example with my daughter's spring select soccer season costs for parents depending on which tournaments we go to. I agree the Swift playgrounds is a great tool for that but it's not as simple as Soulver these kinds of problems. Anyway, thanks for thinking about it!
Zac @ Soulver
under review
Soulver doesn't have the notion of data structures at the moment. My sense is that a programming language like Ruby would be a better tool for this kind of problem, but open to having the discussion about why this should be in Soulver.