What is the issue with executing append in Drscheme using lazyscheme?

  • Thread starter Thread starter ddatta8
  • Start date Start date
Click For Summary

Discussion Overview

The discussion centers around the execution of the `append` function in DrScheme using the LazyScheme dialect, specifically addressing issues encountered when attempting to join two lists.

Discussion Character

  • Technical explanation
  • Debate/contested

Main Points Raised

  • One participant reports an issue with executing `(append '(a b) '(c d))`, receiving an unexpected output involving a promise.
  • Another participant claims that `append` is intended for appending a single element to a list, not for joining two lists, which may indicate a misunderstanding of the function's purpose.
  • A participant mentions encountering error messages when trying different forms of `append`, suggesting that the function is not behaving as expected in LazyScheme.
  • One participant expresses unfamiliarity with LazyScheme, noting that it may have a different implementation of `append` compared to other dialects.

Areas of Agreement / Disagreement

There is no consensus on the correct usage of `append` in LazyScheme, and multiple viewpoints regarding its functionality and the encountered issues remain unresolved.

Contextual Notes

Participants have not clarified the specific differences in the implementation of `append` in LazyScheme compared to other Scheme dialects, nor have they resolved the implications of the error messages related to promises.

ddatta8
Messages
2
Reaction score
0
I am trying to execute the code (append '(a b) '(c d)) in drscheme using lazyscheme and I am getting the following output: (a . #<promise:...cts/lazy/lazy.ss:453:38>). What is the problem? Thanks.
 
Technology news on Phys.org


Append is only for appending an element to a list, not for joining two lists.
 


Thanks but even if I do (append 'a '(c d)) /(append '(a b) 'c),
I get the following error messages:
. . car: expects argument of type <pair>; given a/(a . #<promise:...cts/lazy/lazy.ss:453:38>)
 


Sorry, I am not familiar with the lazyscheme dialect; I didn't realize it had a different version of append.
 

Similar threads

  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 0 ·
Replies
0
Views
3K
  • · Replies 8 ·
Replies
8
Views
2K
Replies
6
Views
4K
  • · Replies 11 ·
Replies
11
Views
3K
  • · Replies 9 ·
Replies
9
Views
3K
  • · Replies 16 ·
Replies
16
Views
4K
Replies
6
Views
2K
  • · Replies 2 ·
Replies
2
Views
2K