How to sum elements in functional way,"[sum(l[:i]) for i, _ in enumerate(l)]"