<div dir="ltr"><div>If we want people to be able to create higher-order functions with precise arities via procedure-reduce-arity, for instance, we need to provide tools for manipulating arity values. Manipulating them is also useful for producing error messages that describe the arity of procedure values. I don't see any reason to close this stuff off, when it's the one useful, non-opaque aspect of procedure values.<br>
</div></div><div class="gmail_extra"><br clear="all"><div>Carl Eastlund</div>
<br><br><div class="gmail_quote">On Thu, Apr 11, 2013 at 11:13 AM, Eli Barzilay <span dir="ltr"><<a href="mailto:eli@barzilay.org" target="_blank">eli@barzilay.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Is there a real need to make this whole thing a public interface? I'd<br>
think that a general direction is to move away from making it public<br>
(ie, remove the ability to create an arity value), and this seems to<br>
add a pretty big chunk of stuff in the opposite direction.<br>
<div class="HOEnZb"><div class="h5"><br>
<br>
About two weeks ago, <a href="mailto:cce@racket-lang.org">cce@racket-lang.org</a> wrote:<br>
> cce has updated `master' from 6e40caa7e2 to df00bbb194.<br>
> <a href="http://git.racket-lang.org/plt/6e40caa7e2..df00bbb194" target="_blank">http://git.racket-lang.org/plt/6e40caa7e2..df00bbb194</a><br>
><br>
> =====[ 7 Commits ]======================================================<br>
> Directory summary:<br>
> 21.0% collects/racket/private/<br>
> 21.5% collects/racket/<br>
> 26.4% collects/scribblings/reference/<br>
> 30.9% collects/tests/racket/<br>
><br>
> ~~~~~~~~~~<br>
><br>
> 59b1e32 Carl Eastlund <<a href="mailto:cce@racket-lang.org">cce@racket-lang.org</a>> 2013-03-30 11:45<br>
> :<br>
> | Changed normalize-arity to coalesce arity-at-least with adjacent numbers.<br>
> |<br>
> | For instance, (normalize-arity (list 1 (arity-at-least 2))) now produces<br>
> | (arity-at-least 1). The implementation and the tests for normalize-arity both<br>
> | reflect this change. The randomized tests now also check that the output<br>
> | represents the same arity as the input.<br>
> :<br>
> M collects/racket/private/norm-arity.rkt | 82 +++++++++++++---------<br>
> M collects/tests/racket/basic.rktl | 112 +++++++++++++++++++++++++-----<br>
><br>
> ~~~~~~~~~~<br>
><br>
> e356c66 Carl Eastlund <<a href="mailto:cce@racket-lang.org">cce@racket-lang.org</a>> 2013-03-30 11:49<br>
> :<br>
> | Re-provide normalize-arity from racket/function.<br>
> :<br>
> M collects/racket/function.rkt | 4 ++--<br>
><br>
> ~~~~~~~~~~<br>
><br>
> 4dd011a Carl Eastlund <<a href="mailto:cce@racket-lang.org">cce@racket-lang.org</a>> 2013-03-30 15:49<br>
> :<br>
> | Added documentation for normalize-arity.<br>
> :<br>
> M collects/scribblings/reference/procedures.scrbl | 42 ++++++++++++++++++----<br>
><br>
> ~~~~~~~~~~<br>
><br>
> 636f8a9 Carl Eastlund <<a href="mailto:cce@racket-lang.org">cce@racket-lang.org</a>> 2013-03-30 21:04<br>
> :<br>
> | Moved normalized-arity?, arity=?, and arity-includes? into racket/function.<br>
> :<br>
> M collects/racket/function.rkt | 94 +++++++++++++++++++++++++++++++++++-<br>
> M collects/tests/racket/basic.rktl | 96 +------------------------------------<br>
><br>
> ~~~~~~~~~~<br>
><br>
> aaa99d5 Carl Eastlund <<a href="mailto:cce@racket-lang.org">cce@racket-lang.org</a>> 2013-03-30 21:05<br>
> :<br>
> | Documented normalized-arity?, arity=?, and arity-includes?.<br>
> :<br>
> M collects/scribblings/reference/procedures.scrbl | 87 +++++++++++++++++++---<br>
><br>
> ~~~~~~~~~~<br>
><br>
> f509420 Carl Eastlund <<a href="mailto:cce@racket-lang.org">cce@racket-lang.org</a>> 2013-03-30 17:12<br>
> :<br>
> | Removed unnecessary duplication of normalize-arity.<br>
> :<br>
> M collects/tests/racket/fixnum.rktl | 21 ++-------------------<br>
><br>
> ~~~~~~~~~~<br>
><br>
> df00bbb Carl Eastlund <<a href="mailto:cce@racket-lang.org">cce@racket-lang.org</a>> 2013-03-31 10:34<br>
> :<br>
> | Updated contracts for arity-related functions.<br>
> |<br>
> | Added contract checking to arity=?, arity-includes?, and normalized-arity.<br>
> | Removed contract checking from normalize-arity to make it a total predicate.<br>
> | Updated documentation for normalize-arity to reflect this change.<br>
> :<br>
> M collects/racket/function.rkt | 21 ++++++++++++++++-----<br>
> M collects/racket/private/norm-arity.rkt | 2 ++<br>
> M collects/scribblings/reference/procedures.scrbl | 13 ++++++-------<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:<br>
<a href="http://barzilay.org/" target="_blank">http://barzilay.org/</a> Maze is Life!<br>
<br>
</font></span></blockquote></div><br></div>