Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Implement -cond-> and -cond->> macros. #349
base: master
Are you sure you want to change the base?
Implement -cond-> and -cond->> macros. #349
Changes from 6 commits
bab3ff7
212afcd
7356472
793f697
593967a
4c87787
8b8b2b1
c135f01
367472a
62780fa
ef25a98
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you build up
steps
in reverse, e.g. with a doublepop
and apush
per clause, then you could usecar
andcdr
instead oflast
andbutlast
, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I don't understand what you mean here. :(
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps I should make myself more clear:
I do understand the the general idea, how to use the built-in functions and why using them is a good idea.
What I'm not sure is the sequence of steps needed to achieve this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does the following make sense?
Then
-cond->
and-cond->>
can be implemented as follows:Key differences:
signal
expects two arguments.-let
; plainlet
will do.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's amazing!! I wish I had thought of this.
Should I close this PR so you can open another one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you think my suggestion is useful and clear enough, then feel free to incorporate it in your own code for this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
I'm incorporating the part where steps are built whit two pop and a push, and the key differences listed above. But if I incorporated all the code, I'd be taking credit for your work. Perhaps you could update over this PR eventually.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But my work is already built on top of your work. ;) Also, my public suggestions are not copyrighted and I don't care about attribution.
Sure, if that's what you prefer, I'd be happy to oblige.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a nice way of looking at it.
IMO, this is the best option :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, then I think we're just waiting for your CA process to complete, and we should be good to go.
BTW, if you rebase this branch off the latest
master
then the CI tests should stop wetting the bed. :)