[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] 5. Program Structure

Andy Wingo scripsit:

> I still think that define-values should be accompanied with
> letrec-values / letrec*-values or not present at all, but given that you
> have an expansion this is not as crucial.

I mostly use define-values at top level to capture the results of a call
to a multiple-valued procedure, in other words like the variable "/"
in Common Lisp.

> (define-values (root rem) (exact-integer-sqrt 34))
> root
> rem
> (+ (square root) rem)

As pointed out by Arcane Sentiment, define-values can only be portably
implemented by using state.

John Cowan      http://www.ccil.org/~cowan      cowan@x
Be yourself.  Especially do not feign a working knowledge of RDF where
no such knowledge exists.  Neither be cynical about RELAX NG; for in
the face of all aridity and disenchantment in the world of markup,
James Clark is as perennial as the grass.  --DeXiderata, Sean McGrath

Scheme-reports mailing list