From a64c1ec2a50f62d63872eac6bc740966602e87bd Mon Sep 17 00:00:00 2001 From: jsdelfino Date: Sun, 11 Oct 2009 00:01:04 +0000 Subject: 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 --- cpp/sca/test/store-function/cart.hpp | 3 +-- cpp/sca/test/store-object/cart.hpp | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) (limited to 'cpp/sca/test') 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 a(accumTotal); - return reduce(a, 0.0, cart); + return tuscany::reduce(accumTotal, 0.0, cart); } const tuscany::value shoppingCart_service(const tuscany::list& 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 a(accum); - return reduce(a, 0.0, cart); + return tuscany::reduce(accum, 0.0, cart); } }; -- cgit v1.2.3