aboutsummaryrefslogtreecommitdiff
path: root/src/list/operation/basic.h
diff options
context:
space:
mode:
authorAdrian Kummerlaender2015-01-18 19:58:35 +0100
committerAdrian Kummerlaender2015-01-18 19:58:35 +0100
commit02c6e34f9859047efe702cf5b866702f7b02d878 (patch)
tree6181e5de2e97b06917189c6e17aeac410a82962f /src/list/operation/basic.h
parentffe8e376086cddda8bb7ca37b02a48f67cbe513d (diff)
downloadTypeAsValue-02c6e34f9859047efe702cf5b866702f7b02d878.tar
TypeAsValue-02c6e34f9859047efe702cf5b866702f7b02d878.tar.gz
TypeAsValue-02c6e34f9859047efe702cf5b866702f7b02d878.tar.bz2
TypeAsValue-02c6e34f9859047efe702cf5b866702f7b02d878.tar.lz
TypeAsValue-02c6e34f9859047efe702cf5b866702f7b02d878.tar.xz
TypeAsValue-02c6e34f9859047efe702cf5b866702f7b02d878.tar.zst
TypeAsValue-02c6e34f9859047efe702cf5b866702f7b02d878.zip
Implemented `Map` in terms of `Fold`
* as its name implies this _function_ applies a given _function_ to each element of a _Cons_ structure * added appropriate test case
Diffstat (limited to 'src/list/operation/basic.h')
-rw-r--r--src/list/operation/basic.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/list/operation/basic.h b/src/list/operation/basic.h
index ff0a4d7..364a542 100644
--- a/src/list/operation/basic.h
+++ b/src/list/operation/basic.h
@@ -11,14 +11,15 @@ class Length {
private:
template <
typename,
- typename Current
+ typename Previous
>
struct Count {
- typedef Add<Size<1>, Current> type;
+ typedef Add<Size<1>, Previous> type;
};
public:
typedef typename Fold<Count, Size<0>, Cons>::type type;
+
};
template <