previous up contents next
Left: Chars Up: Standard library function functions Right: Sort

Subseq

Subseq returns a subsequence of attributes from the Rest of the Rest of the path. The first element of the path is a positive integer that specifies the start point of the subsequence (counting from 0) and the second element of the path is a (possibly negative) integer that specifies the length of the subsequence. If the either first path element or the sum of the first and second path elements is not a positive integer or if the path is too short to include the specified subsequence then Subseq fails.

    Subseq:<0 1 a b c d e f> = a.
    Subseq:<1 2 a b c d e f> = b c.
    Subseq:<2 3 a b c d e f> = c d e.
    Subseq:<5 1 a b c d e f> = f.
    Subseq:<5 -1 a b c d e f> = e.
    Subseq:<5 0 a b c d e f> = .


---------------------------------------------------------

Copyright © Roger Evans, Gerald Gazdar & Bill Keller, Tuesday 10 November 1998