Newbie Design Question
From: Jeff Katcher (jmkatcher_at_yahoo.com)
Date: 11/23/03
- Next message: Joachim Durchholz: "Re: Why I don't believe in static typing"
- Previous message: Feuer: "Re: Why I don't believe in static typing"
- Next in thread: Frode Vatvedt Fjeld: "Re: Newbie Design Question"
- Reply: Frode Vatvedt Fjeld: "Re: Newbie Design Question"
- Reply: Sebastian Stern: "Re: Newbie Design Question"
- Reply: Kenny Tilton: "Re: Newbie Design Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 22 Nov 2003 20:08:28 -0800
I'm back to LISP after having been away for a long, long time (it's
_hard_ to break the SETQ habit :). BTW, this is not homework of any
sort.
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.
Pseudo-code:
(defun chain-stuff (stuff-list start end level)
(if (<= start end)
(dolist (stuff stuff-list)
(when (eligible-p stuff start)
(chain-stuff stuff-list (+ start 5) end
(append level stuff))
)
) level
)
)
What I'd like to return is a list of the accumulated lists (which
would be "level" at the if-else case), but can't think of a way to
do it other than appending to something outside the function's scope.
(Which I viscerally recognize as abhorrent...:)
Thanks in advance,
Jeffrey Katcher
- Next message: Joachim Durchholz: "Re: Why I don't believe in static typing"
- Previous message: Feuer: "Re: Why I don't believe in static typing"
- Next in thread: Frode Vatvedt Fjeld: "Re: Newbie Design Question"
- Reply: Frode Vatvedt Fjeld: "Re: Newbie Design Question"
- Reply: Sebastian Stern: "Re: Newbie Design Question"
- Reply: Kenny Tilton: "Re: Newbie Design Question"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|