[plt-scheme] Local function definition

From: Guillaume Marceau (gmarceau at cs.brown.edu)
Date: Sun Jan 11 19:28:24 EST 2004

What is the prefered way to define a local function in pretty-big?

For now, my code is using the long winded form let/name/lambda. For example:

  (define (find-short-path graph red-nodes blue-nodes)
    ...
    (let ([get-siblings
                (lambda (loci)
                  (map (lambda (sibling) (make-loci sibling (loci-stack loci)))
                       (graph-adjs graph (loci-node loci))))])
       body ... )
    ...)

The extra indentation is quickly pushing my code off the chart.
Is there a standard special form?

-- 
"The thing I remember most about America is that it's silly.
 That can be quite a relief at times."  -- Thom Yorke, Radiohead

- Guillaume



Posted on the users mailing list.