code: public static <T> T splitEachLine(Reader self, String regex, @ClosureParams(value=FromString.class,options="List<String>") Closure<T> closure) throws IOException {
          return splitEachLine(self, Pattern.compile(regex), closure);
      }
docs: Iterates through the given reader line by line, splitting each line using
  the given regex separator. For each line, the given closure is called with
  a single parameter being the list of strings computed by splitting the line
  around matches of the given regular expression.  The Reader is closed afterwards.
  <p>
  Here is an example:
  <pre>
  def s = 'The 3 quick\nbrown 4 fox'
  def result = ''
  new StringReader(s).splitEachLine(/\d/){ parts ->
  result += "${parts[0]}_${parts[1]}|"
  }
  assert result == 'The _ quick|brown _ fox|'
  </pre>
  
  @param self    a Reader, closed after the method returns
  @param regex   the delimiting regular expression
  @param closure a closure
  @return the last value returned by the closure
  @throws IOException if an IOException occurs.
  @throws java.util.regex.PatternSyntaxException
  if the regular expression's syntax is invalid
  @see java.lang.String#split(java.lang.String)
  @since 1.5.5