There is a pre-publication version of this book available for free download. However, it is not as complete as the published version.
Set A to 0 Set K to 1 While K <= length(AList) do: Set A to A + selectListItem(K, AList) # Select the kth item from AList Set K to K + 1 Set A to A / length(List)