[Haskell-cafe] What is the good way to work with list comprehension and UTCTime?

Karl Voelker ktvoelker at gmail.com
Fri Sep 14 08:04:51 CEST 2012


On Thu, Sep 13, 2012 at 10:29 PM, Magicloud Magiclouds <
magicloud.magiclouds at gmail.com> wrote:

> Hi,
>   Simple usage, I could make an instance of Enum to UTCTime, so
> [utcTime..] could work. But that is so stiff. How if sometimes I want
> to step by 1 min, sometimes I want to step by 1 sec?
>   So I think some way like [ t | addUTCTime last 60 ] could be nice.
> But I cannot figure it out....
>   Any idea?
>

Try using Prelude.iterate.

-Karl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20120913/5ab286e4/attachment.htm>


More information about the Haskell-Cafe mailing list