Add some documentation
Fix bug

Using a single step path against an empty list should return `error`
instead of `{ok, undefined}`. Fix consists of reordering function
clauses.
Tweak documenentation