**Steps**
1. Square the numbers that are greater than zero.
2. Multiply by 3 every third number.
3. Multiply by -1 every fifth number.
4. Return the sum of the sequence.

**Example**   
`{ -2, -1, 0, 1, 2 }` returns `-6`
```
1. { -2, -1, 0, 1 * 1, 2 * 2 }
2. { -2, -1, 0 * 3, 1, 4 }
3. { -2, -1, 0, 1, -1 * 4 }
4. -6
```

P.S.: The sequence consists only of integers. And try not to use "for", "while" or "loop" statements.

Source: codewars | Difficulty: EASY
Tags: Fundamentals

Data structures

Starter code: def calc(a):
	

Solutions:
def calc(a):
	return sum((x ** (1 + (x >= 0)) * (1 + 2 * (not i % 3)) * (-1) ** (not i % 5) for (i, x) in enumerate(a, 1)))


def calc(a):
	for (i, n) in enumerate(a):
		if a[i] > 0:
			a[i] *= a[i]
		if i % 3 == 2:
			a[i] = a[i] * 3
		if i % 5 == 4:
			a[i] = a[i] * -1
	return sum(a)


def calc(a):
	print(a)
	for i in range(len(a)):
		if a[i] > 0:
			a[i] *= a[i]
	for i in range(2, len(a), 3):
		a[i] *= 3
	for i in range(4, len(a), 5):
		a[i] *= -1
	return sum(a)


def calc(a):
	sum = 0
	for i in range(len(a)):
		value = a[i]
		if value > 0:
			value *= value
		if (i + 1) % 3 == 0:
			value *= 3
		if (i + 1) % 5 == 0:
			value = -value
		sum += value
	return sum


def mod(e):
	(i, n) = e
	return (n ** 2 if n > 0 else n) * (3 if i % 3 == 0 else 1) * (-1 if i % 5 == 0 else 1)

def calc(lst):
	return sum(map(mod, enumerate(lst, 1)))


def calc(a):
	return sum([i * (i if i > 0 else 1) * (3 if k % 3 == 2 else 1) * (-1 if k % 5 == 4 else 1) for (k, i) in enumerate(a)])


fifth = lambda i, x: x if i % 5 else -x
third = lambda i, x: x if i % 3 else 3 * x
square = lambda x: x if x < 0 else x * x

def calc(a):
	return sum((fifth(i, third(i, square(x))) for (i, x) in enumerate(a, 1)))


from itertools import cycle
from operator import mul
muls = (1, 1, 3, 1, -1, 3, 1, 1, 3, -1, 1, 3, 1, 1, -3)

def calc(a):
	return sum(map(mul, map(lambda n: n * n if n > 0 else n, a), cycle(muls)))


from itertools import cycle

def calc(lst):
	return sum(((a ** 2 if a > 0 else a) * b * c for (a, b, c) in zip(lst, cycle((1, 1, 3)), cycle((1, 1, 1, 1, -1)))))


def calc(a):
	return sum((i ** (1, 2)[i > 0] * (1, 3)[idx % 3 == 2] * (1, -1)[idx % 5 == 4] for (idx, i) in enumerate(a)))