*To*: "C. Diekmann" <diekmann at in.tum.de>*Subject*: Re: [isabelle] No tail-recursive code equation for List.map*From*: René Thiemann <rene.thiemann at uibk.ac.at>*Date*: Fri, 26 Apr 2013 15:50:05 +0200*Cc*: "cl-isabelle-users at lists.cam.ac.uk" <cl-isabelle-users at lists.cam.ac.uk>*In-reply-to*: <CAGbqCMz-55E56FmnaRtdCGfaiuUUmn_8uMLS0-YDjgNh6cQQ6g@mail.gmail.com>*References*: <CAGbqCMz-55E56FmnaRtdCGfaiuUUmn_8uMLS0-YDjgNh6cQQ6g@mail.gmail.com>

Dear all, > when I export list-based code to Scala and run it on huge inputs, it > always gives me a StackOverflowException. Looking at the stack trace > and providing the following tail-recursive version of map, everything > works fine. I had similar problems when processing large files using generated code for Scala, where I did exactly the same as Cornelius did for some similar function to map. However, this optimization is clearly language-dependent, because in Haskell I don't want to have the tail-recursive version, e.g. consider the call take 5 (filter f (map g long_list)) So, if there will be a tail-recursive code equation for List.map in the default library, please only activate it on languages which really profit from tail-recursion. Best regards, René

**Follow-Ups**:**Re: [isabelle] No tail-recursive code equation for List.map***From:*Peter Lammich

**Re: [isabelle] No tail-recursive code equation for List.map***From:*Brian Huffman

**References**:**[isabelle] No tail-recursive code equation for List.map***From:*C. Diekmann

- Previous by Date: [isabelle] Curried and uncurried parameters in Scala
- Next by Date: [isabelle] Problems with proof terms
- Previous by Thread: [isabelle] No tail-recursive code equation for List.map
- Next by Thread: Re: [isabelle] No tail-recursive code equation for List.map
- Cl-isabelle-users April 2013 archives indexes sorted by: [ thread ] [ subject ] [ author ] [ date ]
- Cl-isabelle-users list archive Table of Contents
- More information about the Cl-isabelle-users mailing list