num findGreatestElement(List<num> list){
  num greatestElement = list[0];
  for (num element in list){
    if (element>greatestElement) {
      greatestElement = element;
    }
  }  
  return greatestElement;
}

import 'dart:math';
num findGreatestElement(List<num> list){
  return list.reduce(max);
}