Iterator::IteratorWrapper

module Iterator::IteratorWrapper

Overview

IteratorWrapper eliminates some boilerplate when defining an Iterator that wraps another iterator.

To use it, include this module in your iterator and make sure that the wrapped iterator is stored in the @iterator instance variable.

Defined in:

iterator.cr

Instance Method Summary

  • #rewind

    Rewinds the wrapped iterator and returns self.

Macro Summary

Instance Method Detail

def rewindSource

Rewinds the wrapped iterator and returns self.

Macro Detail

macro wrapped_nextSource

Invokes next on the wrapped iterator and returns stop if the given value was a Iterator::Stop. Otherwise, returns the value.

© 2012–2017 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.22.0/Iterator/IteratorWrapper.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部