toOption method

Option<(A, B)> toOption()

Implementation

Option<(A, B)> toOption() {
  final a = $1().v;
  if (a == null) {
    return None;
  }
  final b = $2().v;
  if (b == null) {
    return None;
  }

  return Some((a, b));
}