Implement a LazyArray class that supports deferred (lazy) evaluation. The class wraps an array of integers and exposes two main operations: 1. map(func): accepts a function and returns a NEW LazyArray object (not in-place mutation) that represents the current chain plus the new function. Functions are NOT applied immediately. 2.…