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

  • Thread starter Thread starter ddatta8
  • Start date Start date
AI Thread Summary
The user is attempting to execute the code (append '(a b) '(c d)) in DrScheme using LazyScheme but encounters an unexpected output: (a . #<promise:...cts/lazy/lazy.ss:453:38>). The issue arises from a misunderstanding of the append function, which is designed to append elements to lists rather than join two lists. The user also reports receiving error messages when trying variations like (append 'a '(c d)) and (append '(a b) 'c), indicating a type mismatch where the car function expects a pair but receives a promise instead. There is a lack of familiarity with the LazyScheme dialect, which appears to have a different implementation of the append function.
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.
 
Thread 'Is this public key encryption?'
I've tried to intuit public key encryption but never quite managed. But this seems to wrap it up in a bow. This seems to be a very elegant way of transmitting a message publicly that only the sender and receiver can decipher. Is this how PKE works? No, it cant be. In the above case, the requester knows the target's "secret" key - because they have his ID, and therefore knows his birthdate.
I tried a web search "the loss of programming ", and found an article saying that all aspects of writing, developing, and testing software programs will one day all be handled through artificial intelligence. One must wonder then, who is responsible. WHO is responsible for any problems, bugs, deficiencies, or whatever malfunctions which the programs make their users endure? Things may work wrong however the "wrong" happens. AI needs to fix the problems for the users. Any way to...
Back
Top