#Python - 31 28
Uses a generator function to save 1 char, so it is necessary to print the value with some function that uses a generator/iterator, like for i in a(b):print(i)
def a(b):yield((b<0)*-2+1)*b
Old one:
def a(b):yield b if b>0 else-b