We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
It would be nice to be able to define setable functions (like setf in common lisp)
You would be able to write get(array i) = value for set(array i value) Maybe using a syntax like this:
get(array i) = value
set(array i value)
defsetter v get(x y) set(x y v)
It should also be possible to use it in structs then like this:
defstruct Test: x with: (setable => true) val v = Test(1) x(v) = 2 println(x(v)) ;;prints 2
The text was updated successfully, but these errors were encountered:
Thanks for the feedback. We have a number of syntactic short hands that we're considering and a setter shorthand is one of them. -Patrick
On Thursday, June 16, 2016, Fabio Krapohl [email protected] wrote:
It would be nice to be able to define setable functions (like setf in common lisp) You would be able to write get(array i) = value for set(array i value) Maybe using a syntax like this: defsetter v get(x y) set(x y v) It should also be possible to use it in structs then like this: defstruct Test: x with: (setable => true) val v = Test(1) x(v) = 2 println(x(v)) ;;prints 2 — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub StanzaOrg/lbstanza#30, or mute the thread https://github.com/notifications/unsubscribe/ABaXC41ZeSktzpIrocGt12AgILIfJAOJks5qMT09gaJpZM4I3UZL .
defstruct Test: x with: (setable => true)
val v = Test(1) x(v) = 2 println(x(v)) ;;prints 2
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub StanzaOrg/lbstanza#30, or mute the thread https://github.com/notifications/unsubscribe/ABaXC41ZeSktzpIrocGt12AgILIfJAOJks5qMT09gaJpZM4I3UZL .
Sorry, something went wrong.
No branches or pull requests
It would be nice to be able to define setable functions (like setf in common lisp)
You would be able to write
get(array i) = value
forset(array i value)
Maybe using a syntax like this:
It should also be possible to use it in structs then like this:
The text was updated successfully, but these errors were encountered: