func FilterIntPtrErr(f func(*int) (bool, error), list []*int) ([]*int, error) {
	if f == nil {
		return []*int{}, nil
	}
	var newList []*int
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if r {
			newList = append(newList, v)
		}
	}
	return newList, nil
}
FilterIntPtrErr takes two arguments
1. Function: takes 1 argument of type int and returns (bool, error)
2. slice of type []*int

Returns:
new filtered list and error
package fp