Re: Newbie Design Question
From: Frode Vatvedt Fjeld (frodef_at_cs.uit.no)
Date: 11/23/03
- Next message: Christopher C. Stacy: "Re: Another algorithmic complexity question"
- Previous message: Feuer: "Re: Why I don't believe in static typing"
- In reply to: Jeff Katcher: "Newbie Design Question"
- Next in thread: Sebastian Stern: "Re: Newbie Design Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Sun, 23 Nov 2003 10:50:18 +0100
jmkatcher@yahoo.com (Jeff Katcher) writes:
> I'm back to LISP after having been away for a long, long time (it's
> _hard_ to break the SETQ habit :).
Welcome back. And please, try at least as hard to lose the dangling
parens. Indentation is the visual code-block delimiter in Lisp, and
the parens merely tell your editor how to indent things. And a
paren-aware editor /is/ essential.
> Anyway, I have a function in my current program which is a planner
> of sorts. It takes a list of stuff as a parameter and builds lists
> of candidates for action.
I wasn't able to understand much from your pseudo-code, but from this
description it seems to me that what you'd want is something like
(remove-if (complement #'eligible-p) stuff-list :start start :end end)
Or, if you need more control:
(loop for stuff in stuff-list as position upfrom 0
when (and (eligible-p stuff)
(blabla stuff start))
collect (figure-out-action stuff position))
Perhaps if you explain why this doesn't work, we can help you more.
-- Frode Vatvedt Fjeld
- Next message: Christopher C. Stacy: "Re: Another algorithmic complexity question"
- Previous message: Feuer: "Re: Why I don't believe in static typing"
- In reply to: Jeff Katcher: "Newbie Design Question"
- Next in thread: Sebastian Stern: "Re: Newbie Design Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|