Skip to content

Add ∘[₁] as aliases for compose[1] #5115

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion pkgs/racket-doc/scribblings/reference/procedures.scrbl
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ arguments; otherwise, the @exnraise[exn:fail:contract]. The given
]}

@deftogether[(@defproc[(compose [proc procedure?] ...) procedure?]
@defproc[(compose1 [proc procedure?] ...) procedure?])]{
@defproc[(compose1 [proc procedure?] ...) procedure?]
@defproc[(∘ [proc procedure?] ...) procedure?]
@defproc[(∘₁ [proc procedure?] ...) procedure?])]{

Returns a procedure that composes the given functions, applying the last
@racket[proc] first and the first @racket[proc] last. The @racket[compose] function
Expand All @@ -45,6 +47,9 @@ the output arity of the first are unrestricted, and they become the
corresponding arity of the resulting composition (including keyword
arguments for the input side).

@racket[∘] and @racket[∘₁] are aliases for @racket[compose] and @racket[compose1]
respectively.

When no @racket[proc] arguments are given, the result is
@racket[values]. When exactly one is given, it is returned.

Expand Down
4 changes: 2 additions & 2 deletions racket/collects/racket/private/list.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@

reverse

compose
compose1)
compose (rename-out [compose ∘])
compose1 (rename-out [compose ∘₁]))

(#%require (rename "sort.rkt" raw-sort sort)
(for-syntax "stxcase-scheme.rkt")
Expand Down