Re: How do you use fold or map to recurse?

0 views
Skip to first unread message
Message has been deleted

A. Mattox Beckman, Jr.

unread,
Oct 1, 2006, 11:32:23 PM10/1/06
to iit-cs44...@googlegroups.com
Use the question database; check the topic
/Topic/Languages/HigherOrderFunctions/Usage.
Each of those functions *could* have been written recursively, but
instead were written using fold_right and map.

On 10/1/06, Kenny <Kenneth...@gmail.com> wrote:
>
> I'm stuck with trying to write some of these functions from the MP
> without using recursion. I get that we're supposed to use map or fold
> to try to get the same effect, but I'm having a hard time seeing how to
> work that. Can someone help me take my brain out of the box by posting
> some OCaml code?
>
>
> >
>


--
A. Mattox Beckman, Jr., Ph.D. <beckm...@gmail.com>
Computer Science, Illinois Institute of Technology
- Where there is life, there is hope. - J. R. R. Tolkien (and others....)

Reply all
Reply to author
Forward
0 new messages