code: function makeLooped(state, fromSegments, toSegments) {
  		var end = Math.min(fromSegments.length, toSegments.length);
  
  		for (var i = 0; i < end; ++i) {
  			var fromSegment = fromSegments[i];
  			var toSegment = toSegments[i];
  
  			if (toSegment.reachable) {
  				fromSegment.nextSegments.push(toSegment);
  			}
  			if (fromSegment.reachable) {
  				toSegment.prevSegments.push(fromSegment);
  			}
  			fromSegment.allNextSegments.push(toSegment);
  			toSegment.allPrevSegments.push(fromSegment);
  
  			if (toSegment.allPrevSegments.length >= 2) {
  				CodePathSegment.markPrevSegmentAsLooped(toSegment, fromSegment);
  			}
  
  			state.notifyLooped(fromSegment, toSegment);
  		}
  	}
docs: Creates looping path.
  
  @param {CodePathState} state - The instance.
  @param {CodePathSegment[]} fromSegments - Segments which are source.
  @param {CodePathSegment[]} toSegments - Segments which are destination.
  @returns {void}