Properties
Similar Topics
Statistics
Comments
1
Participants
2
Subscribers
2
Votes
1
Views
585
Share

How to iterate recursively through a list in subtraction with another list.
Answered
vi=30
ls={1,5,-4}
/////////////////////////
30-1=29
29-5=24
24-(4)=28
output1: [29,24,28]
output2: [30,-1,29,-5,24,4,28]
- GeoGebra
- Help
- Partners
-
Contact us
- Feedback & Questions
- This email address is being protected from spambots. You need JavaScript enabled to view it.
- +43 677 6137 2693
© 2023 International GeoGebra Institute
Recursive?
Try
Sequence(30-Sum(Take(ls,1,j)),j,1,3)
Join({30},Flatten(Sequence({-ls(j),30-Sum(Take(ls,1,j))},j,1,3)))
Recursive?
Try
Sequence(30-Sum(Take(ls,1,j)),j,1,3)
Join({30},Flatten(Sequence({-ls(j),30-Sum(Take(ls,1,j))},j,1,3)))
Comments have been locked on this page!