Comment further on config changes

This commit is contained in:
William Martin 2024-05-10 10:55:34 +02:00
parent 88631d13d4
commit 85e81a50da
2 changed files with 13 additions and 6 deletions

View file

@ -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))