summaryrefslogtreecommitdiffstats
path: root/sca-cpp/trunk/kernel/list.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'sca-cpp/trunk/kernel/list.hpp')
-rw-r--r--sca-cpp/trunk/kernel/list.hpp32
1 files changed, 30 insertions, 2 deletions
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,20 +362,48 @@ template<typename T> const T cadddddddr(const list<T>& 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<typename T> const list<T> cddr(const list<T>& 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<typename T> const list<T> cdddr(const list<T>& p) {
return cdr(cdr(cdr(p)));
}
/**
+ * Returns a list of elements from the 5th to the end of a list.
+ */
+template<typename T> const list<T> cddddr(const list<T>& p) {
+ return cdr(cdr(cdr(cdr(p))));
+}
+
+/**
+ * Returns a list of elements from the 6th to the end of a list.
+ */
+template<typename T> const list<T> cdddddr(const list<T>& p) {
+ return cdr(cdr(cdr(cdr(cdr(p)))));
+}
+
+/**
+ * Returns a list of elements from the 7th to the end of a list.
+ */
+template<typename T> const list<T> cddddddr(const list<T>& p) {
+ return cdr(cdr(cdr(cdr(cdr(cdr(p))))));
+}
+
+/**
+ * Returns a list of elements from the 8th to the end of a list.
+ */
+template<typename T> const list<T> cdddddddr(const list<T>& p) {
+ return cdr(cdr(cdr(cdr(cdr(cdr(cdr(p)))))));
+}
+
+/**
* Returns the length of a list.
*/
template<typename T> struct lengthRef {