A method that returns a new list formed by applying the second argument as a modulus operand on each list member, with two arguments: a list and a numerical value.
My current method only applies modulus operand to the first element and not all the elements.
I'm trying to use the cons operator to build the new list.
modList([Head | Tail], Num) -> [Head rem Num | Tail].