Here are the equations.
1. largestCommonPrefix(x::xs, x::ys) = x::largestCommonPrefix(xs, ys) 2. largestCommonPrefix(x,y) = []
Here is an inside-out evaluation of largestCommonPrefix([2,5,3,9,5], [2,5,2,9,5]).
largestCommonPrefix([2,5,3,9,5], [2,5,2,9,5]) = 2::largestCommonPrefix([5,3,9,5], [5,2,9,5]) (by eq. 1) = 2::5::largestCommonPrefix([3,9,5], [2,9,5]) (by eq. 1) = 2::5::[] (by eq. 2)