racket
How do I return a copy of an object?
I need to implement a function of one argument -- obj -- that returns a Scheme expression that, when evaluated, 开发者_如何学编程will return a copy of obj.[详细]
2023-02-12 22:45 分类:问答rewriting match-lambda
As an exercise I am trying to define a rule match-rewriter that behaves the same as match-lambda but returns its argument if no match is found.So far I have this:[详细]
2023-02-12 06:54 分类:问答removing last element of a list(scheme)
So I have to remove the last element of a list in scheme.开发者_如何转开发 For example, let\'s say I have a list (1 2 3 4). I need to return:[详细]
2023-02-10 10:17 分类:问答eval using current function's namespace
The following racket function produces the erro开发者_如何学Cr: reference to undefined identifier: val[详细]
2023-02-10 06:33 分类:问答Order of evaluation in scheme
T开发者_如何转开发his is what works: (define obj1 (maak-object (coord 1 1) #f #f #t)) (set! karaktersenobjectenlijst (append karaktersenobjectenlijst[详细]
2023-02-10 03:42 分类:问答"select" in Racket
I want to write an event loop single threaded web server to deal with each request in Racket. I see there are select method in unix that I can call,[详细]
2023-02-09 03:47 分类:问答Racket eof-object read from input port
I tried to read string from an input-port in Racket, but no matter what API functions I used to read (read, read-string, read-bytes etc), the return value of those functions was never equal eof-object[详细]
2023-02-08 08:07 分类:问答Including an external file in racket
I would like to include all the functions defined in a given racket file so that I get the same 开发者_Python百科effect as if they were copied. Is it possible to do that?To export the functions out of[详细]
2023-02-06 18:08 分类:问答Idiomatic usage of local vs lambda?
In Exercise 30.1.1 of HtDP, I started off using local and then modified it to use lambda in order to answer the question.[详细]
2023-02-05 04:47 分类:问答racket scheme redefinition of constants
I am currently using racket scheme with DrRacket as the editor for some exploratory programming.When I try and redefine a function I get the following message:[详细]
2023-02-05 04:06 分类:问答