Arc Forumnew | comments | leaders | submitlogin
3 points by rocketnia 5118 days ago | link | parent

Which seems problematic, although I'm not exactly sure why.

I think you've answered your own question. That sounds like multiple value return, and I'm not sure why it bugs me either, but it does exist in Scheme if you find you want to explore that path.

  > (values 1 2 3)
  1
  2
  3
  > (call-with-values (lambda () (values 1 2 3)) list)
  '(1 2 3)
I just found this discussion talking about the motivation and (im)practicality of multiple value return: https://groups.google.com/group/comp.lang.scheme/browse_thre... I don't have time to read the whole thing right now, but I've read the first 25 posts, and I think the first 8 of those (through David Rush's first post) are the most interesting.

Anyway, to look at your issue from another standpoint, do you really expect (list 1 <expression>) to give you a list of length 3? (If you do, I don't hold it against you. ^^ I'm just trying to provoke a gut reaction.)