func (maybeSelf MaybeDef) ToPtr() *interface{} {
	if maybeSelf.Kind() == reflect.Ptr {
		val := reflect.Indirect(reflect.ValueOf(maybeSelf.ref)).Interface()
		return &val
	}
	return &maybeSelf.ref
}
ToPtr Maybe to Ptr
package fpgo
import (
	"errors"
	"fmt"
	"math"
	"reflect"
	"strconv"
)
var (
	ErrConversionSizeOverflow = errors.New("size overflow")
)
type MaybeDef struct {
	ref interface{}
}
func (maybeSelf MaybeDef) Just(in interface{}) MaybeDef {
	return MaybeDef{ref: in}
}
func (maybeSelf MaybeDef) Or(or interface{}) interface{} {
	if maybeSelf.IsNil() {
		return or
	}
	return maybeSelf.ref
}
func (maybeSelf MaybeDef) CloneTo(dest interface{}) MaybeDef {
	if maybeSelf.IsNil() {
		return maybeSelf.Just(nil)
	}
	x := reflect.ValueOf(maybeSelf.ref)
	if x.Kind() == reflect.Ptr {
		starX := x.Elem()
		y := reflect.New(starX.Type())
		starY := y.Elem()
		starY.Set(starX)
		reflect.ValueOf(dest).Elem().Set(y.Elem())
		return maybeSelf.Just(dest)
	}
	dest = x.Interface()
	return maybeSelf.Just(dest)
}
func (maybeSelf MaybeDef) Clone() MaybeDef {
	return maybeSelf.CloneTo(new(interface{}))
}
func (maybeSelf MaybeDef) FlatMap(fn func(interface{}) *MaybeDef) *MaybeDef {
	return fn(maybeSelf.ref)
}
func (maybeSelf MaybeDef) ToString() string {
	if maybeSelf.IsNil() {
		return "<nil>"
	}
	ref := maybeSelf.ref
	switch (ref).(type) {
	default:
		return fmt.Sprintf("%v", ref)
	case int:
		return strconv.Itoa((ref).(int))
	case string:
		return (ref).(string)
	}
}