def map_array(func, arr: list) -> list:
    """
    Calls the given function on every element on the given array and returns the resulting elements.
    """
    res = list()

    for el in arr:
        res.append(func(el))

    return res