racket Questions

3

Solved

Is there a way from a command line to run Racket file and stay in the interactive mode afterwards? E.g. same in Python it would be: python -i <file.py>
Counterpane asked 9/11, 2013 at 11:3

4

Solved

new to stackoverflow and new to racket. I've been studying racket using this documentation: https://docs.racket-lang.org/reference/pairs.html This is my understanding of map: (map (lambda (number) ...
Wilber asked 11/2, 2021 at 5:29

4

I started studying miniKanren with the book "The Reasoned Schemer - second edition" and the DrRacket scheme environment. I installed the "faster-minikanren" package, but the first examples of the ...
Groomsman asked 28/5, 2018 at 14:51

3

Solved

It is possible to have a new line when you write with "display" like (display "exa \n mple") But the problem is that there is no any code to have a new line in strings? Like: "exa \n mple" ...
Suppository asked 15/3, 2013 at 3:3

2

Solved

I know that you can use ' (aka quote) to create a list, and I use this all the time, like this: > (car '(1 2 3)) 1 But it doesn’t always work like I’d expect. For example, I tried to create a...
Coign asked 25/1, 2016 at 3:18

3

I am trying to write a simple program in Racket that prints 1 if the value of a is > 1, prints 0 if the value of a = 0 and -1 if a < 0 . I wrote the following but looks like it is not taking ...
Teahan asked 4/5, 2015 at 23:22

6

Solved

I've been trying to do a function that returns the Cartesian Product of n sets,in Dr Scheme,the sets are given as a list of lists,I've been stuck at this all day,I would like a few guidelines as wh...
Alfy asked 20/3, 2010 at 23:47

2

I usually use Sublime text editor and gnome terminal to edit and run my programs. Due to educational purposes, I am using the IDE Dr. Racket. I could not find an autocomplete feature to use while...
Murvyn asked 14/9, 2016 at 20:55

1

Solved

I'm trying to understand parameters in Racket for single-threaded programs and I read about it here. That said, I'm still confused about why it is useful for single-threaded programs. Why is it use...
Typographer asked 8/8, 2020 at 9:46

1

Solved

So from my personal research, it seems that closures / currying seem to be more or less the exact same thing, which can't be obviously correct. So where is the difference? So here is an example of ...
Honkytonk asked 21/6, 2020 at 14:16

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) ...
Hackberry asked 16/12, 2013 at 23:18

0

Racket and Xtext are both considered as language workbenches, but they are based on different concepts and workflows. As an experienced Xtext user, I find it difficult to adapt my thought process ...
Schaal asked 5/5, 2020 at 20:57

1

Solved

Im learning Racket and have some troubles. I want to iterate over a list and find the index of some value. I have the following code: (define (index list entry) (define index 0) (for ([i list])...
Fatwitted asked 5/2, 2020 at 16:47

1

Does Racket have a bidirectional hashmap? That is, a hash map that can in constant time, be given a key and look up the value, or given the value and look up the key? I would be happy for an API t...
Alphitomancy asked 18/2, 2016 at 2:35

4

Solved

I realize the definitions of "strongly typed" and "softly typed" are loose and open to interpretation, but I have yet to find a clear definition in relation to untyped Racket (which from my underst...
Practice asked 17/11, 2016 at 20:0

1

Solved

In one variant of Common Lisp (I think it was CMUCL, but I might be wrong—I can't find it any more) there was a function that was (I think) called function-lambda-expression. If it got a procedure,...
Felixfeliza asked 1/2, 2020 at 7:10

1

Solved

I know Racket doesn't have "docstrings" in the same way that many other languages do, but given how convenient documenting things at the source is, I'd like to approximate something like it in Rack...
Corporeity asked 21/11, 2019 at 18:30

4

Solved

I just found the pattern matching feature in Racket very powerful. > (match '(1 2 3) [(list a b c) (list c b a)]) '(3 2 1) > (match '(1 2 3) [(list 1 a ...) a]) '(2 3) > (match '(1 2 ...
Googol asked 10/8, 2012 at 21:44

4

Solved

How do I download and parse a csv file in Racket?
Sneak asked 4/6, 2012 at 14:56

1

SICP Exercise 3.57: How many additions are performed when we compute the nth Fibonacci number using the definition of fibs based on the add-streams procedure? Show that the number of additions wou...
Embitter asked 23/9, 2019 at 17:55

2

Solved

I am working an a project that, given a specific latitude and longitude coordinate, outputs the neighborhood that the point resides in. I have the latitude and longitude coordinates that make up th...
Unlive asked 24/12, 2013 at 1:32

4

Solved

All I'm trying to do is use a when statement to return a value :( I want the functionality of: if(x) return y And I'm trying to use: (when (x) y) But the when statement is not evaluating in ...
Afterbirth asked 29/4, 2015 at 3:54

3

In miniKanren, succeed can be defined as (define succeed (== #t #t)), and fail can be defined as (define fail (=== #t #f)). But what about #s and #u as short forms of succeed and fail, as they appe...
Phosphoresce asked 21/7, 2019 at 13:51

2

What is Racket's equivalent for viewing and changing the working directory of a process like pwd and cd?
Derail asked 29/7, 2018 at 13:29

5

I am learning Scheme and just came across Closures. The following example provided, demonstrating the use of Closures: (define (create-closure x) (lambda () x)) (define val (create-closure 10)) ...
Spital asked 25/3, 2017 at 19:44

© 2022 - 2024 — McMap. All rights reserved.