From d907c6fe647877d70da4d0da60a9d484bb36560f Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Mon, 16 Jan 2012 03:49:08 +0000 Subject: Add a partitioner component, which combined with a selector component can be used to implement data partitioning, sharding, or data access load balancing for example. git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1231822 13f79535-47bb-0310-9956-ffa450edef68 --- sca-cpp/trunk/kernel/list.hpp | 32 ++++++++++++++++++++++++++++++-- 1 file changed, 30 insertions(+), 2 deletions(-) (limited to 'sca-cpp/trunk/kernel/list.hpp') diff --git a/sca-cpp/trunk/kernel/list.hpp b/sca-cpp/trunk/kernel/list.hpp index df7bc27c03..60dcbb083a 100644 --- a/sca-cpp/trunk/kernel/list.hpp +++ b/sca-cpp/trunk/kernel/list.hpp @@ -362,19 +362,47 @@ template const T cadddddddr(const list& p) { } /** - * Returns the cdr of a cdr of a list. + * Returns a list of elements from the 3rd to the end of a list. */ template const list cddr(const list& p) { return cdr(cdr(p)); } /** - * Returns the cdr of a cdr of the cdr of a list. + * Returns a list of elements from the 4th to the end of a list. */ template const list cdddr(const list& p) { return cdr(cdr(cdr(p))); } +/** + * Returns a list of elements from the 5th to the end of a list. + */ +template const list cddddr(const list& p) { + return cdr(cdr(cdr(cdr(p)))); +} + +/** + * Returns a list of elements from the 6th to the end of a list. + */ +template const list cdddddr(const list& p) { + return cdr(cdr(cdr(cdr(cdr(p))))); +} + +/** + * Returns a list of elements from the 7th to the end of a list. + */ +template const list cddddddr(const list& p) { + return cdr(cdr(cdr(cdr(cdr(cdr(p)))))); +} + +/** + * Returns a list of elements from the 8th to the end of a list. + */ +template const list cdddddddr(const list& p) { + return cdr(cdr(cdr(cdr(cdr(cdr(cdr(p))))))); +} + /** * Returns the length of a list. */ -- cgit v1.2.3