ext/ preprocessor/ seq/ restn.bi

This file is part of the <ext/Preprocessor> library API, and can be directly included by user programs.

Summary
ext/ preprocessor/ seq/ restn.biThis file is part of the <ext/Preprocessor> library API, and can be directly included by user programs.
LicenseCopyright © 2009, FreeBASIC Extended Library Development Group Copyright © 2002, Paul Mensonides
Macros
fbextPP_SeqRestNRemoves a number of leading elements from a sequence.

License

Copyright © 2009, FreeBASIC Extended Library Development Group Copyright © 2002, Paul Mensonides

Distributed under the Boost Software License, Version 1.0.  See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

Distributed under the FreeBASIC Extended Library Group license.  See accompanying file LICENSE.txt or copy at http://code.google.com- /p- /fb-extended-lib- /wiki- /License

Macros

fbextPP_SeqRestN

# define fbextPP_SeqRestN(
   n,
   seq
) FBEXT_PP_SEQ_FOLDLEFT( fbextPP_SeqRestN__M, FBEXT_PP_EMPTY(), FBEXT_PP_CAT(fbextPP_TupleElem__2__1, FBEXT_PP_SEQ_SPLIT(FBEXT_PP_INC(n), (__)seq)) )

Removes a number of leading elements from a sequence.

Parameters

nThe number of leading elements to remove.
seqA sequence.

Returns

The cropped sequence.

Description

Given a sequence (a)(b)(c)(d) and n 2, this macro will expand to (c)(d).

# define fbextPP_SeqRestN(
   n,
   seq
) FBEXT_PP_SEQ_FOLDLEFT( fbextPP_SeqRestN__M, FBEXT_PP_EMPTY(), FBEXT_PP_CAT(fbextPP_TupleElem__2__1, FBEXT_PP_SEQ_SPLIT(FBEXT_PP_INC(n), (__)seq)) )
Removes a number of leading elements from a sequence.