func PMapPtr(f func(*Employer) *Employer, list []*Employer, optional ...fp.Optional) []*Employer {
	if f == nil {
		return []*Employer{}
	}
	var worker = len(list)
	if optional != nil && len(optional) > 0 {
		if optional[0].FixedPool > 0 && optional[0].FixedPool < worker {
			worker = optional[0].FixedPool
		}
		if optional[0].RandomOrder == true {
			return pMapPtrNoOrder(f, list, worker)
		}
	}
	return pMapPtrPreserveOrder(f, list, worker)
}
PMapPtr applies the function(1st argument) on each item in the list and returns a new list.
Order of new list is guaranteed. This feature can be disabled by passing: Optional{RandomOrder: true} to gain performance
Run in parallel. no_of_goroutines = no_of_items_in_list or 3rd argument can be passed to fix the number of goroutines.

Takes 3 inputs. 3rd argument is optional
1. Function - takes 1 input
2. List
3. optional argument - fp.Optional{FixedPool: <some_number>}
package employer
import _ "reflect" 
import "sort" 
import "sync"
import "github.com/logic-building/functional-go/fp" 
import "github.com/logic-building/functional-go/internal/employee" 
func Map(f func(Employer) Employer, list []Employer) []Employer {
	if f == nil {
		return []Employer{}
	}
	newList := make([]Employer, len(list))
	for i, v := range list {
		newList[i] = f(v)
	}
	return newList
}
func MapPtr(f func(*Employer) *Employer, list []*Employer) []*Employer {
	if f == nil {
		return []*Employer{}
	}
	newList := make([]*Employer, len(list))
	for i, v := range list {
		newList[i] = f(v)
	}
	return newList
}
func MapPtrErr(f func(*Employer) (*Employer, error), list []*Employer) ([]*Employer, error) {
	if f == nil {
		return []*Employer{}, nil
	}
	newList := make([]*Employer, len(list))
	for i, v := range list {
		var err error
		newList[i], err = f(v)
		if err != nil {
			return nil, err
		}
	}
	return newList, nil
}
func MapErr(f func(Employer) (Employer, error), list []Employer) ([]Employer, error) {
	if f == nil {
		return []Employer{}, nil
	}
	newList := make([]Employer, len(list))
	for i, v := range list {
		var err error
		newList[i], err = f(v)
		if err != nil {
			return nil, err
		}
	}
	return newList, nil
}
func Filter(f func(Employer) bool, list []Employer) []Employer {
	if f == nil {
		return []Employer{}
	}
	var newList []Employer
	for _, v := range list {
		if f(v) {
			newList = append(newList, v)
		}
	}
	return newList
}
func FilterPtr(f func(*Employer) bool, list []*Employer) []*Employer {
	if f == nil {
		return []*Employer{}
	}
	var newList []*Employer
	for _, v := range list {
		if f(v) {
			newList = append(newList, v)
		}
	}
	return newList
}
func FilterPtrErr(f func(*Employer) (bool, error), list []*Employer) ([]*Employer, error) {
	if f == nil {
		return []*Employer{}, nil
	}
	var newList []*Employer
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if r {
			newList = append(newList, v)
		}
	}
	return newList, nil
}
func FilterErr(f func(Employer) (bool, error), list []Employer) ([]Employer, error) {
	if f == nil {
		return []Employer{}, nil
	}
	var newList []Employer
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if r {
			newList = append(newList, v)
		}
	}
	return newList, nil
}
func Remove(f func(Employer) bool, list []Employer) []Employer {
	if f == nil {
		return []Employer{}
	}
	var newList []Employer
	for _, v := range list {
		if !f(v) {
			newList = append(newList, v)
		}
	}
	return newList
}
func RemovePtr(f func(*Employer) bool, list []*Employer) []*Employer {
	if f == nil {
		return []*Employer{}
	}
	var newList []*Employer
	for _, v := range list {
		if !f(v) {
			newList = append(newList, v)
		}
	}
	return newList
}
func RemovePtrErr(f func(*Employer) (bool, error), list []*Employer) ([]*Employer, error) {
	if f == nil {
		return []*Employer{}, nil
	}
	var newList []*Employer
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if !r {
			newList = append(newList, v)
		}
	}
	return newList, nil
}
func RemoveErr(f func(Employer) (bool, error), list []Employer) ([]Employer, error) {
	if f == nil {
		return []Employer{}, nil
	}
	var newList []Employer
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if !r {
			newList = append(newList, v)
		}
	}
	return newList, nil
}
func Some(f func(Employer) bool, list []Employer) bool {
	if f == nil {
		return false
	}
	for _, v := range list {
		if f(v) {
			return true
		}
	}
	return false
}
func SomePtr(f func(*Employer) bool, list []*Employer) bool {
	if f == nil {
		return false
	}
	for _, v := range list {
		if f(v) {
			return true
		}
	}
	return false
}
func SomePtrErr(f func(*Employer) (bool, error), list []*Employer) (bool, error) {
	if f == nil {
		return false, nil
	}
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return false, err
		}
		if r {
			return true, nil
		}
	}
	return false, nil
}
func SomeErr(f func(Employer) (bool, error), list []Employer) (bool, error) {
	if f == nil {
		return false, nil
	}
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return false, err
		}
		if r {
			return true, nil
		}
	}
	return false, nil
}
func Every(f func(Employer) bool, list []Employer) bool {
	if f == nil || len(list) == 0 {
		return false
	}
	for _, v := range list {
		if !f(v) {
			return false
		}
	}
	return true
}
func EveryPtr(f func(*Employer) bool, list []*Employer) bool {
	if f == nil || len(list) == 0 {
		return false
	}
	for _, v := range list {
		if !f(v) {
			return false
		}
	}
	return true
}
func EveryPtrErr(f func(*Employer) (bool, error), list []*Employer) (bool, error) {
	if f == nil || len(list) == 0 {
		return false, nil
	}
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return false, err
		}
		if !r {
			return false, nil
		}
	}
	return true, nil
}
func EveryErr(f func(Employer) (bool, error), list []Employer) (bool, error) {
	if f == nil || len(list) == 0 {
		return false, nil
	}
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return false, err
		}
		if !r {
			return false, nil
		}
	}
	return true, nil
}
func DropWhile(f func(Employer) bool, list []Employer) []Employer {
	if f == nil {
		return []Employer{}
	}
	var newList []Employer
	for i, v := range list {
		if !f(v) {
			listLen := len(list)
			newList = make([]Employer, listLen-i)
			j := 0
			for i < listLen {
				newList[j] = list[i]
				i++
				j++
			}
			return newList
		}
	}
	return newList
}
func DropWhilePtr(f func(*Employer) bool, list []*Employer) []*Employer {
	if f == nil {
		return []*Employer{}
	}
	var newList []*Employer
	for i, v := range list {
		if !f(v) {
			listLen := len(list)
			newList = make([]*Employer, listLen-i)
			j := 0
			for i < listLen {
				newList[j] = list[i]
				i++
				j++
			}
			return newList
		}
	}
	return newList
}
func DropWhilePtrErr(f func(*Employer) (bool, error), list []*Employer) ([]*Employer, error) {
	if f == nil {
		return []*Employer{}, nil
	}
	var newList []*Employer
	for i, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if !r {
			listLen := len(list)
			newList = make([]*Employer, listLen-i)
			j := 0
			for i < listLen {
				newList[j] = list[i]
				i++
				j++
			}
			return newList, nil
		}
	}
	return newList, nil
}
func DropWhileErr(f func(Employer) (bool, error), list []Employer) ([]Employer, error) {
	if f == nil {
		return []Employer{}, nil
	}
	var newList []Employer
	for i, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if !r {
			listLen := len(list)
			newList = make([]Employer, listLen-i)
			j := 0
			for i < listLen {
				newList[j] = list[i]
				i++
				j++
			}
			return newList, nil
		}
	}
	return newList, nil
}
func TakeWhile(f func(Employer) bool, list []Employer) []Employer {
	if f == nil {
		return []Employer{}
	}
	var newList []Employer
	for _, v := range list {
		if !f(v) {
			return newList
		}
		newList = append(newList, v)
	}
	return newList
}
func (slice employerSlice) TakeWhile(functors ...employerFunctorForFilter) employerSlice {
	tmpSlice := slice
	for _, f := range functors {
		if f == nil {
			continue
		}
		tmpSlice = TakeWhile(f, tmpSlice)
	}
	return tmpSlice
}
func TakeWhilePtr(f func(*Employer) bool, list []*Employer) []*Employer {
	if f == nil {
		return []*Employer{}
	}
	var newList []*Employer
	for _, v := range list {
		if !f(v) {
			return newList
		}
		newList = append(newList, v)
	}
	return newList
}
func (slice employerSlicePtr) TakeWhilePtr(functors ...employerFunctorForFilterPtr) employerSlicePtr {
	tmpSlice := slice
	for _, f := range functors {
		if f == nil {
			continue
		}
		tmpSlice = TakeWhilePtr(f, tmpSlice)
	}
	return tmpSlice
}
func TakeWhilePtrErr(f func(*Employer) (bool, error), list []*Employer) ([]*Employer, error) {
	if f == nil {
		return []*Employer{}, nil
	}
	var newList []*Employer
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if !r {
			return newList, nil
		}
		newList = append(newList, v)
	}
	return newList, nil
}
func TakeWhileErr(f func(Employer) (bool, error), list []Employer) ([]Employer, error) {
	if f == nil {
		return []Employer{}, nil
	}
	var newList []Employer
	for _, v := range list {
		r, err := f(v)
		if err != nil {
			return nil, err
		}
		if !r {
			return newList, nil
		}
		newList = append(newList, v)
	}
	return newList, nil
}
func PMap(f func(Employer) Employer, list []Employer, optional ...fp.Optional) []Employer {
	if f == nil {
		return []Employer{}
	}
	var worker = len(list)
	if optional != nil && len(optional) > 0 {
		if optional[0].FixedPool > 0 && optional[0].FixedPool < worker {
			worker = optional[0].FixedPool
		}
		if optional[0].RandomOrder == true {
			return pMapNoOrder(f, list, worker)
		}
	}
	return pMapPreserveOrder(f, list, worker)
}
func pMapPreserveOrder(f func(Employer) Employer, list []Employer, worker int) []Employer {
	chJobs := make(chan map[int]Employer, len(list))
	go func() {
		for i, v := range list {
			chJobs <- map[int]Employer{i: v}
		}
		close(chJobs)
	}()
	chResult := make(chan map[int]Employer, worker/3)
	var wg sync.WaitGroup
	for i := 0; i < worker; i++ {
		wg.Add(1)
		go func(chResult chan map[int]Employer, chJobs chan map[int]Employer) {
			defer wg.Done()
			for m := range chJobs {
				for k, v := range m {
					chResult <- map[int]Employer{k: f(v)}
				}
			}
		}(chResult, chJobs)
	}
	go func() {
		wg.Wait()
		close(chResult)
	}()
	newListMap := make(map[int]Employer, len(list))
	newList := make([]Employer, len(list))
	for m := range chResult {
		for k, v := range m {
			newListMap[k] = v
		}
	}
	for i := 0; i < len(list); i++ {
		newList[i] = newListMap[i]
	}
	return newList
}
func pMapNoOrder(f func(Employer) Employer, list []Employer, worker int) []Employer {
	chJobs := make(chan Employer, len(list))
	go func() {
		for _, v := range list {
			chJobs <- v
		}
		close(chJobs)
	}()
	chResult := make(chan Employer, worker/3)
	var wg sync.WaitGroup
	for i := 0; i < worker; i++ {
		wg.Add(1)
		go func(chResult chan Employer, chJobs chan Employer) {
			defer wg.Done()
			for v := range chJobs {
				chResult <- f(v)
			}
		}(chResult, chJobs)
	}
	go func() {
		wg.Wait()
		close(chResult)
	}()
	newList := make([]Employer, len(list))
	i := 0
	for v := range chResult {
		newList[i] = v
		i++
	}
	return newList
}