Subject: Re: [r6rs-discuss] Proposed features for small Scheme, part 1: a stake in the ground
From: "Aaron W. Hsu" <[email-masked]>
To: "David Van Horn" <[email-masked]>
Date: Sat, 05 Sep 2009 21:17:51 -0400
List-Id: R6RS discussion <r6rs-discuss.lists.r6rs.org>

On Fri, 04 Sep 2009 21:53:23 -0400, David Van Horn
<[email-masked]> wrote:

> I was not able to find documentation for procedure arity inspection for
> Chez or Scheme 48.  Please let me know if you have pointers.

Chez Scheme doesn't make this particularly obvious, but it is fairly easy
to do once you realize what it is you are doing.

	<http://www.scheme.com/csug8/debug.html#./debug:h4>

There are two means of doing this: the interactive or procedural
inspector. The basic process is the same in both. You inspect the
procedure, and then examine the source. If the source is a procedure, it
will have a lambda, followed by the formals. You can then get the
information you need from examining what the formals structure is.
Building a 'procedure-arity' procedure would be fairly simple on top of
this.

	Aaron W. Hsu

-- 
Of all tyrannies, a tyranny sincerely exercised for the good of its
victims may be the most oppressive. -- C. S. Lewis

_______________________________________________
r6rs-discuss mailing list
[email-masked]
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss