-
Notifications
You must be signed in to change notification settings - Fork 27
Common interface #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Indeed it would great to know if a value is Tuple without having to check each type one by one (is Tuple2, is Tuple3...). It could also a share the common /// Represents a tuple.
abstract class Tuple {
/// Creates a [List] containing the items of this [Tuple].
///
/// The elements are in item order. The list is variable-length
/// if [growable] is true.
List toList({bool growable = false});
} |
Looks like tuple is coming directly to dart and this package will go to
sleep.
Le lun. 6 avr. 2020 à 11:52, Alexandre Roux <[email protected]> a
écrit :
Indeed it would great to know if a value is Tuple without having to check
each type one by one (is Tuple2, is Tuple3...). It could also a share the
common toList method they all have:
/// Represents a tuple.abstract class Tuple {
/// Creates a [List] containing the items of this [Tuple]. /// /// The elements are in item order. The list is variable-length /// if [growable] is true. List toList({bool growable = false});
}
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#13 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAJ4MWMFYR2MJRSBE3KVNZTRLGQ5RANCNFSM4ITUWV6A>
.
--
Robbie
|
Thanks for the information @Solido. Is there any place I could look for more information (current status, planned implementation) as I could not find relevant information so far? |
HI @alextekartik |
It would it very convenient to have a common interface for tuple :
Tuple
So you can store List but add different implementations.
Currently I need to strongly type on Tuple2 but some result got more entries.
This interface
Tuple
can gives you the number of index (arity) and allow access to value by index and an iterator.Thank you !
The text was updated successfully, but these errors were encountered: