Skip to main content
2 of 4
edited tags
Drew
  • 79.1k
  • 10
  • 123
  • 257

Is there a way to spread a list like in Typescript or Golang?

I have a variable with some common values between dap-mode debug templates and I want to use that variable along with other cons elements for :environment-variable in languages like Golang or Typescript you would do something like this:

variable = [1, 2, 3]
another_variable = [...variable, 4, 5, 6]

then another_variable will carry the value of [1, 2, 3, 4, 5, 6]

How can I do this in Emacs Lisp?

shackra
  • 2.8k
  • 20
  • 51