racket Questions

1

Solved

I want to convert a string into a list of one strings in Racket: (string-split-wishful "abcd" "") => (list "a" "b" "c" "d") This is the function that I wish for. The closest thing is string-s...
Interpenetrate asked 26/9, 2017 at 20:19

3

Solved

Is it possible to compile for Windows or Mac OSX while working in Linux for Racket programming language (cross-compile)? DrRacket IDE does not provide any such menu item. Raco help command also did...
Hollands asked 17/9, 2017 at 4:52

1

Solved

Racket seems to have two mechanisms for adding per-type information to structs: generics and properties. Unfortunately, the documentation doesn't seem to indicate when one is preferred over the oth...
Henhouse asked 14/9, 2017 at 17:50

1

Solved

I am using following simple code to solve n-queens problem: #lang racket ; following returns true if queens are on diagonals: (define (check-diagonals bd) (for/or ((r1 (length bd))) (for/or ...
Klinges asked 10/9, 2017 at 19:12

2

Solved

Now that Chez Scheme is open-source, I wonder how it compares to Racket and other Schemes or languages in terms of performance, so that one could make informed choices about using them in one's pro...
Chiliad asked 31/7, 2017 at 23:18

2

I am a undergraduate who wants to go through "The Scheme programming language" as a self-study. Here is a simple program and I named it as "reciprocal.ss" (define reciprocal (lambda (n) (if(= n 0)...
Taylor asked 27/7, 2017 at 5:28

2

Solved

I'm working in Racket but as far as I know this is the case in Scheme in general; you cannot do something like this because we are trying to define something in an expression context: (if conditio...
Syncopated asked 20/7, 2017 at 10:3

1

Solved

When running Racket in a command line, you can start running a racket program using (enter! "yourfile.rkt") How do we exit the current .rkt program while still keeping Racket open in the comman...
Karisa asked 2/7, 2017 at 21:21

1

Solved

I am used to OCaml where I rely heavily on the result type, along with a monadic interface to handle failures in my applications. Exceptions do exist in OCaml but I rarely use them, except for work...
Cupidity asked 8/6, 2017 at 15:23

8

I am very very interested in Macros and just beginning to understand its true power. Please help me collect some great usage of macro systems. So far I have these constructs: Pattern Matching: ...
Derrek asked 28/12, 2010 at 19:20

4

Solved

I'm working with simple lists in Racket, and I was doing a function to sum the elements of a list. But I would like to know if there is any simpler way to do this. I did this function: (define (...
Guttural asked 6/1, 2017 at 18:28

1

Solved

If I have the following program written in C (compiled with GCC on Debian 8.7), I am able to call atexit() as you would expect: #include <stdlib.h> void exit_handler(void) { return; } int...
Fenugreek asked 6/5, 2017 at 22:30

1

Solved

I have a file with the name “functions.rkt”, where I have some functions. And I am working in another file, let’s name it “working.rkt” I have tried the following (one by one) at “working.rkt” to...
Tessatessellate asked 18/4, 2017 at 11:20

1

Solved

I have created executable of following code in Racket (choosing Racket and not GRacket): #lang racket (print "Hello World!") It creates a tgz of 3.6 mb with an executable of 6.2 mb. This seems ...
Minelayer asked 9/4, 2017 at 13:59

2

Solved

How can I convert a string of digits to an integer ? I want "365" to be converted to 365. What I have tried, string->list then char->integer, but this returns ASCII value of that integer, how can ...
Clance asked 15/10, 2013 at 10:35

3

Solved

I am trying to understand recursion in Scheme and I have a hard time doing the dry run for it, for example a simple Fibonacci number problem. Could someone break down the steps in which the addit...
Brain asked 2/2, 2013 at 0:32

3

Solved

I'm trying to write a macro in racket/scheme that operates like a for loop across some arbitrary code such that the body of the loop is unrolled. For example, the following code (macro-for ((i '(0...
Artichoke asked 15/4, 2016 at 9:40

3

common lisp and clojure do (defn function-name (arg1 arg2) (body)) racket/scheme does (defn (function-name arg1 arg2) (body)) The latter makes more sense to me because the syntax for function...
Hypotension asked 21/1, 2017 at 0:19

3

I'm stuck 5 days with this task in Racket, does anybody know how can I approach it? Given a function of arity 2 and a list of n elements, return the evaluation of the string function of all the e...
Aschim asked 10/2, 2014 at 21:26

2

Solved

I keep accidently hitting ctrl-t in Doctor Racket, and then when it opens a new tab, the only way I know how to get rid of the unwanted new tab is by closing everything and reopening the files I wa...
Dinnie asked 5/1, 2017 at 17:12

1

Solved

The project I am working on defines some complex structures that receive messages and run within their own thread. The structures are user-defined and transformed via macros to threads and runtime ...
Treytri asked 2/1, 2017 at 18:23

1

Solved

It seems to me that technically both are interchangeable but have different conventional meanings.
Celestyn asked 1/1, 2017 at 18:26

3

Solved

This is trivial implement of course, but I feel there is certainly something built in to Racket that does this. Am I correct in that intuition, and if so, what is the function?
Scarlett asked 8/4, 2013 at 4:2

4

Solved

What are the increment and decrement operators in scheme programming language. I am using "Dr.Racket" and it is not accepting -1+ and 1+ as operators. And, I have also tried incf and decf, but no u...
Rica asked 15/6, 2014 at 10:20

3

Solved

I'm trying to get Geiser's REPL to work in Emacs, but it doesn't seem to be able to find Racket. racket is on my path, but anytime I type run-geiser followed by racket it complains: Unab...
Beaudette asked 11/2, 2012 at 2:23

© 2022 - 2024 — McMap. All rights reserved.