File: nextElem.Rd

package info (click to toggle)
r-cran-iterators 1.0.7-1
  • links: PTS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 532 kB
  • sloc: sh: 29; makefile: 1
file content (32 lines) | stat: -rw-r--r-- 843 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
\name{nextElem}
\alias{nextElem}
\alias{nextElem.containeriter}
\alias{nextElem.funiter}
\title{Get Next Element of Iterator}
\description{
  \code{nextElem} is a generic function used to produce values. If a
  \code{checkFunc} was specified to the constructor, the potential
  iterated values will be passed to the \code{checkFunc} until the
  \code{checkFunc} returns \code{TRUE}. When the iterator has no more
  values, it calls stop with the message 'StopIteration'.
}
\usage{
nextElem(obj, \dots)

\method{nextElem}{containeriter}(obj, \dots)
\method{nextElem}{funiter}(obj, \dots)
}
\arguments{
  \item{obj}{an iterator object.}
  \item{\dots}{additional arguments that are ignored.}
}
\value{
  The value.
}
\examples{
  it <- iter(c('a', 'b', 'c'))
  print(nextElem(it))
  print(nextElem(it))
  print(nextElem(it))
}
\keyword{methods}