consec<A, R> function
Maps a synchronous or asynchronous value to a single value.
Implementation
FutureOr<R> consec<A, R>(
FutureOr<A> a,
FutureOr<R> Function(A a) callback, {
void Function(Object e)? onError,
}) {
return consecList<R>(
[a],
(items) => callback(
items[0] as A,
),
);
}