headList<T> function

T? headList<T>(
  1. Iterable<T> it
)

Returns first element.

Implementation

T? headList<T>(Iterable<T> it) {
  if (it.isEmpty) {
    return null;
  }
  return it.first!;
}