diff options
Diffstat (limited to 'src/list')
-rw-r--r-- | src/list/operation/higher/misc.h | 20 | ||||
-rw-r--r-- | src/list/operation/reverse.h | 30 |
2 files changed, 30 insertions, 20 deletions
diff --git a/src/list/operation/higher/misc.h b/src/list/operation/higher/misc.h index 95a5f50..1eacaaa 100644 --- a/src/list/operation/higher/misc.h +++ b/src/list/operation/higher/misc.h @@ -2,7 +2,6 @@ #define TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_MISC_H_ #include "fold.h" -#include "list/operation/concatenate.h" #include "conditional/if.h" namespace tav { @@ -49,25 +48,6 @@ class Filter { }; -template <typename List> -class Reverse { - private: - template < - typename Current, - typename Previous - > - struct reversed_concatenate { - typedef typename Concatenate< - Previous, - Cons<Current, void> - >::type type; - }; - - public: - typedef typename Fold<reversed_concatenate, void, List>::type type; - -}; - } #endif // TYPEASVALUE_SRC_LIST_OPERATION_HIGHER_MISC_H_ diff --git a/src/list/operation/reverse.h b/src/list/operation/reverse.h new file mode 100644 index 0000000..7a0305c --- /dev/null +++ b/src/list/operation/reverse.h @@ -0,0 +1,30 @@ +#ifndef TYPEASVALUE_SRC_LIST_OPERATION_REVERSE_H_ +#define TYPEASVALUE_SRC_LIST_OPERATION_REVERSE_H_ + +#include "concatenate.h" +#include "higher/fold.h" + +namespace tav { + +template <typename List> +class Reverse { + private: + template < + typename Current, + typename Previous + > + struct reversed_concatenate { + typedef typename Concatenate< + Previous, + Cons<Current, void> + >::type type; + }; + + public: + typedef typename Fold<reversed_concatenate, void, List>::type type; + +}; + +} + +#endif // TYPEASVALUE_SRC_LIST_OPERATION_REVERSE_H_ |