What is scheme's equivalent of tuple unpacking?

前端 未结 6 1674
说谎
说谎 2021-02-05 07:39

In Python, I can do something like this:

t = (1, 2)
a, b = t

...and a will be 1 and b will be 2. Suppose I have a list \'(1 2) in

6条回答
  •  感情败类
    2021-02-05 08:16

    I think this is what you are looking for:

    • http://www.phyast.pitt.edu/~micheles/scheme/scheme16.html

    Look at let-values or let+.

提交回复
热议问题