function square(arr) {
    return arr.reduce((r, o, i) => {
        r.push(o * o);
        return r;
    }, [])
}