Fix option type

This commit is contained in:
Sasha Koshka 2025-01-22 17:40:33 -05:00
parent 9bad4d68f1
commit 62e3c7814c

View File

@ -10,14 +10,14 @@ func O[T any](value T) Option[T] {
return Option[T](ucontainer.O(value)) return Option[T](ucontainer.O(value))
} }
func (option *Option[T]) Get() (T, bool) { func Void[T any]() Option[T] {
return option.Get() return Option[T](ucontainer.Void[T]())
} }
func (option *Option[T]) Set(value T) { func (option Option[T]) Ok() bool {
option.Set(value) return (ucontainer.Optional[T])(option).Exists()
} }
func (option *Option[T]) Reset() { func (option Option[T]) Get() (T, bool) {
option.Reset() return (ucontainer.Optional[T])(option).Value()
} }