+ import std.math; import std.typecons; - import std.math; /* " - This function will take an array of integers. For all entries in the array, the function shall square the integer entry if its index is a ? ---- + This function will take an array of integers. For all entries in the array, the function shall square the integer entry if its index is a - multiple of 3 and will cube the integer entry if its index is a multiple of 4 and not a multiple of 3. The function will not ? ---- + multiple of 3 and will cube the integer entry if its index is a multiple of 4 and not a multiple of 3. The function will not - change the entries in the array whose indexes are not a multiple of 3 or 4. The function shall then return the sum of all entries. ? ---- + change the entries in the array whose indexes are not a multiple of 3 or 4. The function shall then return the sum of all entries. - - Examples: ? ---- + Examples: - >>> lst ? ---- + >>> lst - [1L, 2L, 3L] ? ---- + [1L, 2L, 3L] - >>> lst ? ---- + >>> lst - [] + [] - >>> lst ? ---- + >>> lst - [-1L, -5L, 2L, -1L, -5L] ? ---- + [-1L, -5L, 2L, -1L, -5L] - */ long sum_squares(long[] lst)