REBOL Document

At - Function Summary


Summary:

Returns the series at the specified index.

Usage:

at series index

Arguments:

series - The series argument. (must be: series port)

index - Can be positive, negative, or zero. (must be: number logic pair)

Description:

Provides a simple way to index into a series. AT returns the series at the new index point. Note that the operation is relative to the current position within the series.


    numbers: [11 22 33]
    print at numbers 2
    22 33


    words: [grand grape great good]
    print first at words 2
    grape


    remove at words 2
    insert at words 3 [super]
    probe words
    [grand great super good]

Related:

head - Returns the series at its head.
pick - Returns the value at the specified position in a series.
skip - Returns the series forward or backward from the current position.
tail - Returns the series at the position after the last value.


<Back | Index | Next>

Copyright 2004 REBOL Technologies