Commit Graph

4 Commits

Author SHA1 Message Date
Eli Barzilay
be84425bd0 Rewrite compose' and add compose1'.
The new version fixes some problems with the previous one, most notably
it can create a keyworded function when the last input is is keyworded.
`compose1' is a restricted variant that requires single values in the
composed pipeline -- besides being potentially faster (probably more
if/when there is cross module inlining), it has a semantical
justification, similar to the restricting function call arguments to
return single values, with similar robustness benefits.  The
implementation of both is done in a generalized way, and the results can
be faster for both `compose' and `compose1'.  (Not by much -- 20% and
30% resp.)

One thing that it could do is to reduce the resulting arity to match the
last given function.  I didn't do this since it adds a significant
overhead to the result.  (No strong opinion on doing that...)
2011-06-14 19:02:30 -04:00
Eli Barzilay
17b6ffa731 Move thunk' from unstable/function' into `racket/function'.
Actually, the new `thunk' is a nullary function, which I think is very
popular expectation for the name.  Since there are possible uses for the
any-arity version, it's added too, as `thunk*'.
2011-06-07 03:38:06 -04:00
Eli Barzilay
a70ef57f02 Move identity' from unstable/function' into `racket/function'. 2011-06-07 03:38:06 -04:00
Matthew Flatt
c95a398754 move most of the 'scheme' collection to the 'racket' collection 2010-04-20 15:24:48 -06:00