head function
Finds the first element in the list
Uses dart's List.first
property
Example
_.head(["Dart", "Javascript", "Swift"]);
// Returns "Dart"
Implementation
dynamic head(List list) {
return list.first;
}
Finds the first element in the list
Uses dart's List.first
property
Example
_.head(["Dart", "Javascript", "Swift"]);
// Returns "Dart"
dynamic head(List list) {
return list.first;
}