htdp Questions
5
I'm using the beginning language with list abbreviations for DrRacket and want to make a powerset recursively but cannot figure out how to do it. I currently have this much
(define
(powerset aL)
...
2
I have the following htdp/bsl program saved as example.rkt:
#lang htdp/bsl
(+ 1 1)
When the above is run using racket example.rkt, the output is as expected (i.e. 2).
However, when I try to sta...
Tafoya asked 4/9, 2017 at 23:28
1
I just installed DrRacket, and tried out the language "How To Design Programs - Beginning Student".
Racket - A programmable programming language
Racket - Getting Started
I run (+ 1 1), and it ta...
3
In Exercise 18.1.12 from htdp, I've re-written the maxi function using "local".
;; maxi : non-empty-lon -> number
;; to determine the largest number on alon
(define (maxi alon)
(cond
[(empty...
4
Or the basic work need to do to create a GUI. I know the basic Components
of GUI, but where to begin. I'm just a self-study person and I'm reading "How to Design Program" (HtDP) at the end of the b...
Minister asked 6/12, 2011 at 15:18
2
Solved
i searched the internet for hours, but didn't find a satisfying answer to what's the difference between the first and second version of HTDP (How to design programs)?
Why should I start with...
1
Solved
I am trying to write a source file for DrRacket that specifies one of the languages from How to Design Programs Teaching Languages (see the Racket documentation). I know I can select such a languag...
1
Solved
I want to load an image and animate it in Racket. I can do it easily in the Dr. Racket, but I am using Emacs with Geiser. To load the image I need to:
(require racket/draw)
Next, to draw this i...
1
I'm guessing that #lang racket is a dialect of scheme with much more out of the box structures and common functions and perhaps would be more pedagogic. What are the perks a #lang racket against #l...
4
Solved
We have two functions that compute the factorial of a given number. The first one, !, uses an accumulator style. The second, fact, uses natural recursion.
(define (! n0)
(local (;; accumulator is...
1
© 2022 - 2024 — McMap. All rights reserved.