REBOL 3 Docs Guide Concepts Functions Datatypes Errors
  TOC < Back Next >   Updated: 3-Aug-2010 Edit History  

REBOL 3 Functions: tail?

tail?  series

Returns TRUE if empty, or for series, if index is at or beyond its tail.

Arguments:

series [series! gob! port! bitset! map!]

See also:

empty?   tail   head   head?  

Description

This function is the best way to detect the end of a series while moving through it.

print tail? "string"
false
print tail? tail "string"
true
str: "Ok"
print tail? tail str
true
print tail? next next str
true
items: [oven sink stove blender]
while [not tail? items] [
    print first items
    items: next items
]
blender
blk: [1 2]
print tail? tail blk
true
print tail? next next blk
true


  TOC < Back Next > REBOL.com - WIP Wiki Feedback Admin