Subject: Re: Recursion? or Non-recursion?

> 
> I'd like to make sure I'm going the right direction.
> I'm wondering if  the following "stockValue" I made is recursive, because it's not recursive itself, but auxiliary fuction is recursive.
> 
> amountList::Stock -> [Amount]
> amountList  = []
> amountList ... = ... amountList ...
>                           ------------------------------ 
>                           |-> it's recursive definition, isn't it?

Yep.

> stockValue :: Stock -> Amount
> stockValue s = ... amountList s ...
> 
> Is this also recursive definition?
> 

The idea is to define stockValue without *any explicit
use of recursion*. stockValue shouldn't itself be recursive,
nor should it make use of any auxiliary recursive functions.
Except those that are defined in the standard prelude
(such as map and sum), of course.

/CC

___________________________________________________________________________
Christian Collberg      | Email: c_collberg@cs.auckland.ac.nz
Computer Science Dept   | Fax:   +64-9-373-7453
University of Auckland  | Phone: +64-9-373-7599 x 6137
Private Bag 92019,      | WWW:   http://www.cs.auckland.ac.nz/~collberg/
Auckland, NZ            |
___________________________________________________________________________
"Education is an admirable thing, but it is well to remember from time
to time that nothing that is worth knowing can be taught." - Oscar Wilde
___________________________________________________________________________