Next Previous Up Top Contents Index

5.11 The STREAMS module

skip-through

Function

Summary

Skips through an input stream past the first occurrence of a given element.

Signature

skip-through input-stream element #key test => found? 

Arguments

input-stream
An instance of <stream>.

element
An instance of <object>.

test
An instance of <function>. Default value: ==.

Values

found?
An instance of <boolean>.

Library

io

Module

streams

Description

Positions input-stream after the first occurrence of element, starting from the stream's current position. Returns #t if the element was found, or #f if the end of the stream was encountered. When skip-through does not find element, it leaves input-stream positioned at the end.

The skip-through function determines whether the element occurred by calling the test function test. The test function must accept two arguments. The order of the arguments is the element retrieved from the stream first and element second.


System and I/O Reference - 31 MAR 2000

Next Previous Up Top Contents Index