Adds max fn for list.