Simple Array Sum

  • + 0 comments

    This one's for the functional peeps out there:

    from functools import reduce
    
    def simpleArraySum(ar):
        # Write your code here
        return reduce(lambda x, y: x + y, ar)