some<R> method

Maybe<R>? some<R>(
  1. R some(
    1. T val
    )
)

fMap

When it has Value Return Some(some(it))

otherwise return None(null)

Implementation

Maybe<R> some<R>(R some(T val)) {
  if (this != null) return Some(some(this!.value));
  return None();
}