[plt-scheme] Frtime...

From: Gregory Cooper (greg at cs.brown.edu)
Date: Tue Dec 19 15:49:07 EST 2006

The problem is actually that, if you're using FrTime, you need to use
its version of (lib "list.ss"), which is (lib "list.ss" "frtime").
Otherwise, 'filter' works incorrectly and, in the way you happen to be
using it, in a silent and rather subtle way.  Since you're passing it
a constant list, there is no type mismatch.  However, it doesn't know
how to interpret time-varying values, so they never look like 'false'.
 Thus, the expression:

  (filter (lambda(m) (< m (cadr gregorian))) (build-list 12 (lambda(x)
(+ x 1))))

always returns the (constant) list (1 2 3 4 5 6 7 8 9 10 11 12).

Greg

On 12/19/06, Gregory Cooper <greg at cs.brown.edu> wrote:
> Hi Dan,
>
> It looks like you've exposed a bug in FrTime.  I'm looking into it and
> will follow up once I figure out what's going on.
>
> Greg
>
> On 12/19/06, geb a <geb_a at yahoo.com> wrote:
> > I hope this is not too off-topic.  I have a function
> > that I feed a list of day month year in two different
> > days.  In one case the list of day month year is
> > generated from Frtime's (seconds->date seconds)
> > command in the other, the date list is just passed
> > into the function.
> >
> > Strangely, I end up with two different answers.  It
> > absolutely makes no sense to me.
> >
> > Btw, the code is from Calendrical Calculations...
> >
> > Dan
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Tired of spam?  Yahoo! Mail has the best spam protection around
> > http://mail.yahoo.com
> >
> > _________________________________________________
> >   For list-related administrative tasks:
> >   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
> >
> >
> >
> >
>


Posted on the users mailing list.