Comment further on config changes
This commit is contained in:
parent
88631d13d4
commit
85e81a50da
2 changed files with 13 additions and 6 deletions
|
|
@ -118,6 +118,7 @@ func (o Option[T]) Expect(message string) T {
|
|||
panic(message)
|
||||
}
|
||||
|
||||
// Map applies a function to the contained value of (if [Some]), or returns [None].
|
||||
func Map[T, U any](o Option[T], f func(T) U) Option[U] {
|
||||
if o.present {
|
||||
return Some(f(o.value))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue