// Map applies mapping function on optional value if it presents
Map applies mapping function on optional value if it presents
// Map applies mapping function on optional value if it presents
func (d Duration) Map(f func(time.Duration) time.Duration) Duration {
	if f == nil || !d.IsPresent() {
		return Duration{}
	}
	return OfDuration(f(d.value))
}
func ( d Duration ) Map ( f func ( time . Duration ) time . Duration ) Duration { if f == nil || ! d . IsPresent ( ) { return Duration { } } return OfDuration ( f ( d . value ) ) }
Map applies mapping function on optional value if it presents
Map applies mapping function on optional value if it presents