Functional approach to a shopping basket
===

I was reading http://www.infoq.com/interviews/trelford-functional and trying to understand the alternative approach to OO.

> Q I see you’re doing a talk here at GOTOCon on functional
> architecture, what is that? I thought all architectures were object
> oriented?  
> 
> A Well, they’re not; I wanted to highlight the idea that your choice
> of language and platform does affect your architecture in the way you
> think; how picking a functional language or architecture can really
> benefit the system. 
> 
> If I just take a simple example say we write a retail application, if
> you think just about objects and mutation, then you would think when
> you’re constructing a basket of items, as you add an item you'd
> increase the quantity and if somebody returns an item or cancels an
> item, you'd decrease the quantity, you’d be doing it wrong. 
> 
> With retail system, you need to track what’s actually been done so you
> can detect fraud, it’s one of the key elements of the system; so you
> actually add new values each this time, you never mutate. 
> 
> So just from one of the most basic systems that we interact with
> everyday, functional immutable style is actually close to the
> architecture you want.

If you were to adopt a more functional style wrt a shopping basket app, how would you be thinking about the problem? eg Would you still have a shopping basket object and rather than mutate its contents you'd create a new one or something?

Many thx