From 2e58bae3b46dc292736bbdbba6d4ee56b1ee51ed Mon Sep 17 00:00:00 2001 From: Adrian Kummerlaender Date: Thu, 22 Jan 2015 18:16:45 +0100 Subject: Renamed `Concatenate` to `Append` to match Scheme function naming --- src/list/list.h | 2 +- src/list/operation/append.h | 27 +++++++++++++++++++++++++++ src/list/operation/concatenate.h | 27 --------------------------- src/list/operation/reverse.h | 8 ++++---- 4 files changed, 32 insertions(+), 32 deletions(-) create mode 100644 src/list/operation/append.h delete mode 100644 src/list/operation/concatenate.h (limited to 'src') diff --git a/src/list/list.h b/src/list/list.h index b0fe407..b89e1ca 100644 --- a/src/list/list.h +++ b/src/list/list.h @@ -30,6 +30,6 @@ using Tail = Cdr; } #include "operation/basic.h" -#include "operation/concatenate.h" +#include "operation/append.h" #endif // TYPEASVALUE_SRC_LIST_LIST_H_ diff --git a/src/list/operation/append.h b/src/list/operation/append.h new file mode 100644 index 0000000..9e1be79 --- /dev/null +++ b/src/list/operation/append.h @@ -0,0 +1,27 @@ +#ifndef TYPEASVALUE_SRC_LIST_OPERATION_APPEND_H_ +#define TYPEASVALUE_SRC_LIST_OPERATION_APPEND_H_ + +namespace tav { + +template < + typename Primary, + typename Secondary +> +struct Append { + typedef Cons< + Head, + typename Append< + Tail, + Secondary + >::type + > type; +}; + +template +struct Append { + typedef Secondary type; +}; + +} + +#endif // TYPEASVALUE_SRC_LIST_OPERATION_APPEND_H_ diff --git a/src/list/operation/concatenate.h b/src/list/operation/concatenate.h deleted file mode 100644 index 21eb1ee..0000000 --- a/src/list/operation/concatenate.h +++ /dev/null @@ -1,27 +0,0 @@ -#ifndef TYPEASVALUE_SRC_LIST_OPERATION_CONCATENATE_H_ -#define TYPEASVALUE_SRC_LIST_OPERATION_CONCATENATE_H_ - -namespace tav { - -template < - typename Primary, - typename Secondary -> -struct Concatenate { - typedef Cons< - Head, - typename Concatenate< - Tail, - Secondary - >::type - > type; -}; - -template -struct Concatenate { - typedef Secondary type; -}; - -} - -#endif // TYPEASVALUE_SRC_LIST_OPERATION_CONCATENATE_H_ diff --git a/src/list/operation/reverse.h b/src/list/operation/reverse.h index 7a0305c..632fa5b 100644 --- a/src/list/operation/reverse.h +++ b/src/list/operation/reverse.h @@ -1,7 +1,7 @@ #ifndef TYPEASVALUE_SRC_LIST_OPERATION_REVERSE_H_ #define TYPEASVALUE_SRC_LIST_OPERATION_REVERSE_H_ -#include "concatenate.h" +#include "append.h" #include "higher/fold.h" namespace tav { @@ -13,15 +13,15 @@ class Reverse { typename Current, typename Previous > - struct reversed_concatenate { - typedef typename Concatenate< + struct reversed_append { + typedef typename Append< Previous, Cons >::type type; }; public: - typedef typename Fold::type type; + typedef typename Fold::type type; }; -- cgit v1.2.3