func MapInt64(f func(int64) int64, list []int64) []int64 {
	if f == nil {
		return []int64{}
	}
	newList := make([]int64, len(list))
	for i, v := range list {
		newList[i] = f(v)
	}
	return newList
}
MapInt64 applies the function(1st argument) on each item of the list and returns new list

Takes 2 inputs
1. Function - takes 1 input
2. List

Returns
New List.
Empty list if all arguments are nil or either one is nil

Example: Square each item in the list
MapInt64(squareInt, []int64{1, 2, 3}) // Returns [1, 4, 9]

func squareInt(num int64) int64 {
return num * num
}
package fp
func MapInt(f func(int) int, list []int) []int {
	if f == nil {
		return []int{}
	}
	newList := make([]int, len(list))
	for i, v := range list {
		newList[i] = f(v)
	}
	return newList
}