[Haskell] Fwd: [Haskell-cafe] Question about memory usage

Alberto G. Corona agocorona at gmail.com
Mon Aug 16 06:58:06 EDT 2010


It is not repeated because fiblist is pure and has no arguments. Otherwise
it would be repeated.



2010/8/14 Tako Schotanus <tako at codejive.org>

> I was reading this article:
>
> http://scienceblogs.com/goodmath/2009/11/writing_basic_functions_in_has.php
>
> And came to the part where it shows:
>
>
> > fiblist = 0 : 1 : (zipWith (+) fiblist (tail fiblist))
>
>
> Very interesting stuff for somebody who comes from an imperative world of
> course.
> But then I read that "Once it's been referenced, then the list up to where
> you looked is concrete - the computations *won't* be repeated."
> and I started wondering how that works.
> Because this seems to mean that functions could have unknown (to the
> caller) memory requirements.
> How does one, programming in Haskell, keep that in check?
> And when does that memory get reclaimed?
>
> Cheers,
> -Tako
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell/attachments/20100816/e5efe857/attachment.html


More information about the Haskell mailing list