shift<T> function

T? shift<T>(
  1. List<T> l
)

Implementation

T? shift<T>(List<T> l) {
  if (l.isNotEmpty) {
    final first = l.first;
    l.removeAt(0);
    return first;
  }
  return null;
}