How can i make a list of cumulative sum of a other list?
i tried it that way:
;;all temperatrue-values around the turtle saved in list set tempera
Similar to Alan's solution (Just an update for the recent version of NetLogo that replaces ? with -> for anonymous procedures.)
to-report partial-sums [lst] report butfirst reduce [[result-so-far next-item] -> lput (next-item + last result-so-far) result-so-far] fput [0] lst end