1 Matching Annotations
- Sep 2023
-
bugs.ruby-lang.org bugs.ruby-lang.org
-
I think there are real-world use cases! Would you consider converting a history of transactions into a history of account balances a valid use-case? That can be done easily with a scan. For example, if you have transactions = [100, -200, 200] then you can find the history of account balances with transactions.scan_left(0, &:+) # => [0, 100, -100, 100].
Tags
Annotators
URL
-