sum is a function which takes a slice of numbers and adds them together. What would its function signature look like in Go?
Write a function which takes an integer and halves it and returns true if it was even or false if it was odd. For example
half(1) should return
(0, false) and
half(2) should return
Write a function with one variadic parameter that finds the greatest number in a list of numbers.
makeEvenGenerator as an example, write a
makeOddGenerator function that generates odd numbers.
The Fibonacci sequence is defined as:
fib(0) = 0,
fib(1) = 1,
fib(n) = fib(n-1) + fib(n-2). Write a recursive function which can find
What are defer, panic and recover? How do you recover from a run-time panic?