diff options
author | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-11 00:01:04 +0000 |
---|---|---|
committer | jsdelfino <jsdelfino@13f79535-47bb-0310-9956-ffa450edef68> | 2009-10-11 00:01:04 +0000 |
commit | a64c1ec2a50f62d63872eac6bc740966602e87bd (patch) | |
tree | e4eab2e74b82eb51c4a5d9b3a132506895974f93 /cpp/sca/test | |
parent | 89246640ca239097800fed58e7abc5bc050e3f56 (diff) |
Some code cleanup, removed unused functions, changed == empty-list to isNil to avoid unnecessary construction of empty lists, replaced some casts by generic declarations. Added simple maybe, failable and state monad classes to help return optional objects or failures and carry state around. Added utility functions to zip and unzip list.
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@823981 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/sca/test')
-rw-r--r-- | cpp/sca/test/store-function/cart.hpp | 3 | ||||
-rw-r--r-- | cpp/sca/test/store-object/cart.hpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/cpp/sca/test/store-function/cart.hpp b/cpp/sca/test/store-function/cart.hpp index f3b0f6195e..9ed6474985 100644 --- a/cpp/sca/test/store-function/cart.hpp +++ b/cpp/sca/test/store-function/cart.hpp @@ -50,8 +50,7 @@ const bool shoppingCart_deleteAll() { } const double shoppingCart_getTotal() { - tuscany::lambda<double(double, ItemType)> a(accumTotal); - return reduce(a, 0.0, cart); + return tuscany::reduce<ItemType, double>(accumTotal, 0.0, cart); } const tuscany::value shoppingCart_service(const tuscany::list<tuscany::value>& args) { diff --git a/cpp/sca/test/store-object/cart.hpp b/cpp/sca/test/store-object/cart.hpp index fc6155aa25..f35a5c4527 100644 --- a/cpp/sca/test/store-object/cart.hpp +++ b/cpp/sca/test/store-object/cart.hpp @@ -66,8 +66,7 @@ public: } virtual const double getTotal() const { - tuscany::lambda<double(double, Item)> a(accum); - return reduce(a, 0.0, cart); + return tuscany::reduce<Item, double>(accum, 0.0, cart); } }; |