kotlin-coding-challenges

Product

Instructions

Given a list of integers implement a function which returns the product of all numbers in the list.

Challenge Solution

Examples

product(listOf(1, 2)) // 2

product(listOf(1, 2, 4)) // 8

product(listOf(2, 4, 10)) // 80

Hints

Hint 1 You can use recursion