DrRacket is a graphical environment for developing programs using the Racket programming languages.
Questions tagged [dr.racket]
24 questions
0
votes
1 answer
Dr Racket will not save any of my files. Has anyone had this error before or have any ideas?
I have reinstalled Dr Racket including older versions. No matter what whenever I save I get this error: There was an error saving
bytes->string/locale: string is not a well-formed UTF-8 encoding
string: #"pl\373"
0
votes
1 answer
What's setf and is it a valid function in Dr.Racket?
I have an assignment where I have to define an alias to an expression, in one of the guides we are told to use either setf or lists of lists to define them. To be more specific we need to assign to the alias ADD/SUCC/PRED/etc their lambda calculus…

Pamela Horn
- 5
- 2
0
votes
0 answers
Is there a way to make a plain chart in DrRacket?
I've been looking for an answer online, but all I've found are ways to plot points and create graphs. I was inspired by this fitness tracker (https://www.reddit.com/r/Racket/comments/5ywuf8/my_hobby_project_in_racket_a_fitness_activity/) I'm trying…
user8503635
0
votes
0 answers
What is the reason of syntax error in this Lazy script in Dr.Racket?
I have this really simple script file test.rkt which tries to define a construct called pair:
#lang lazy
(define (pair A B)
(λ (sel)
(sel A B)))
(define (fst A B) A)
(define (snd A B) B)
syntax checker gives me error:
test.rkt:1:0:…

Sajuuk
- 2,667
- 3
- 22
- 34
0
votes
1 answer
Using unit-testing for a procedure in Racket
If I call in Racket/Dr. Racket the following code:
> add1
I get:
#
If I am using a library for unit-test called rackunit and I try this:
(require rackunit)
(check-equal? add1 #)
The test fails with a syntax…
user7120460
0
votes
1 answer
How to debugg iterative procedures?
I am using Dr. Racket and Racket for educational purposes (studying the SICP book). Dr. Racket is great and it has an awesome tool called "trace".
After using:
(require trace/racket)
(trace function)
It is possible to see what is happening in a…
user4206400
0
votes
1 answer
LISP clause for and clause let ¿why?,making a programming language in racket using ragg
I have long been trying to find the error, I'm doing a programming language and have the next code, using ragg, I have a syntax-object(resto ...) what has a bracket as data, I transform this syntax-object to a datum:
(let ([i (syntax->datum…

Julian Solarte
- 555
- 6
- 29
-1
votes
1 answer
Dr. Racket: saving intermidiate results - Collatz Conjecture
I am new into coding and got interested in Dr. Racket and I am facing my first problem now. I created this code:
(define (collatz n)
(cond ((= n 1) 1)
((> n 1) (collatz_helper n))))
(define (collatz_helper n)
(if (even? n)
…

herbrand
- 13
- 3
-3
votes
1 answer
Intersecting Rectangles in Racket
#lang racket
(define(rectangleList list rectangle1)(recursion list rectangle1'()))
;(define rectangleList(list '(2 4 6 1)'(1 8 4 4)'(0 5 4 0)))
;(define rectangle1 '(1 3 5 2))
(define(recursion rectangleList rectangle1 returnedList)
(if(<(length…

MareeSky
- 1
- 2