Comment

Comment by hmmdar

The only time `IsSet` would be false is when `NewOption` was not used to initialize the value.

e.g.

  var o Option[int32]
or could have `None` helper

  func None[T any]() Option[T] { return Option[T]{} }

  o := None[int32]()
parent hmmdar 4 years ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton