option 0.2.0 option: ^0.2.0 copied to clipboard
The Option typeclass inspired by Scala's implementation and Haskell's Maybe monad. Option is a composable and more expressive alternative to things that may be null on absence of value.
Use this package as a library
Depend on it
Run this command:
With Dart:
$ dart pub add option
This will add a line like this to your package's pubspec.yaml (and run an implicit dart pub get
):
dependencies:
option: ^0.2.0
Alternatively, your editor might support dart pub get
. Check the docs for your editor to learn more.
Import it
Now in your Dart code, you can use:
import 'package:option/option.dart';