swap method

Option<Some<T>> swap()

Implementation

@pragma('vm:prefer-inline')
Option<Some<T>> swap() => unwrap().map(Some.new);