code: public static <T> Iterator<Queue<Optional<T>>> trails(int trailSize, Iterator<T> iterator) {
          return new TrailsIterator<>(iterator, trailSize, Function.identity());
      }
docs: Adapts an iterator to an iterator showing predecessors of the contained
  elements. This iterator always yields an alias to the same queue, beware
  of aliasing problems. e.g:
  <code>
  iterator: [1,2,3,4], trailSize: 3 ->
  [[Nothing, Nothing, Just 1],[Nothing Just 1, Just 2], [Just 1, Just 2, Just 3], [Just 2, Just 3, Just 4]]
  </code>
  
  @param <T> the adapted iterator element type
  @param trailSize the trail size
  @param iterator the iterator to be adapted
  @return TODO