Skip to content

Instantly share code, notes, and snippets.

View a-hamouda's full-sized avatar

Abdelhamid Youssef a-hamouda

  • Alexandria, Egypt
View GitHub Profile
@a-hamouda
a-hamouda / either.dart
Created October 31, 2021 19:43
Either in dart
class Either<L, R> {
final L? _left;
final R? _right;
const Either._({L? left, R? right})
: _left = left,
_right = right;
factory Either.left(L left) {
return Either._(left: left, right: null);