Hi Sasa,
It might also help to look at the type of foldr:
foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b
The function go has type:
go :: Ord a => a -> (Maybe a, Bool) -> (Maybe a, Bool)
The tuple, initially (Nothing, True), will be passed to go as its *2nd* argument; the first argument will be an element of the list. The underscore, which means match anything and throw it away, is there because we don't care about any of the other elements once we know the list is not ordered.
Hope that helps,
vale