-
Notifications
You must be signed in to change notification settings - Fork 0
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
Are arrow macros valid places? #4
Comments
The current implementation of arrows already makes it possible to use arrow forms as places with the exception of diamond macros with multiple diamonds (which is an extension, anyway). It might be possible to get this last one to work using a custom |
I must admit that I never thought about this. I struggle a bit with coming up with use cases in the cases where the expansion has let bindings and/or conditionals, though. |
Conditionals make it possible to set different places. As for named bindings, likely the same use cases as non- |
Example for conditionals: BINDING-ARROWS> (let ((cons (cons (cons 1 2) 3)))
(setf (cond-> cons
(t car)
(t cdr))
42)
cons)
((1 . 42) . 3)
BINDING-ARROWS> (let ((cons (cons (cons 1 2) 3)))
(setf (cond-> cons
(nil car)
(t cdr))
42)
cons)
((1 . 2) . 42)
BINDING-ARROWS> (let ((cons (cons (cons 1 2) 3)))
(setf (cond-> cons
(t car)
(nil cdr))
42)
cons)
(42 . 3)
BINDING-ARROWS> (let ((cons (cons (cons 1 2) 3)))
(setf (cond-> cons
(nil car)
(nil cdr))
42)
cons)
42 |
There is a question whether a call to e.g.
->
or-<>
is a valid place and therefore passable tosetf
.What do you think about this? It should be possible to define proper
setf
expanders for those in order to deal with the fact that the PR from #3 turns them intolet*
forms which are not valid places.The text was updated successfully, but these errors were encountered: