Skip to content

Comments

stream*: allow 1 argument#2229

Merged
bennn merged 1 commit intoracket:masterfrom
bennn:streamstar
Sep 17, 2018
Merged

stream*: allow 1 argument#2229
bennn merged 1 commit intoracket:masterfrom
bennn:streamstar

Conversation

@bennn
Copy link
Contributor

@bennn bennn commented Aug 16, 2018

No description provided.

@defform[(stream* expr ...)]{
A shorthand for nested @racket[stream-cons]es, but the final @racket[expr]
@defform[(stream* expr ... rest-expr)]{
A shorthand for nested @racket[stream-cons]es, but the final argument
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use "argument" only for function arguments, not for subexpressions in a form.

(let ([tl-val tl])
(if (stream? tl-val)
tl-val
(raise-argument-error 'stream* "stream?" tl-val)))]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably the expansion in this case should call a function to check the argument and potentially raise an error, instead of inlining the checking and error.

@bennn bennn merged commit 710cbd2 into racket:master Sep 17, 2018
@bennn bennn deleted the streamstar branch September 17, 2018 01:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants