logo
down
shadow

SCHEME QUESTIONS

Built in Binary Conversion in Scheme/Lisp
Built in Binary Conversion in Scheme/Lisp
it helps some times Binary and decimal are representations of numbers; numbers themselves are not binary or decimal.number->string converts from a number (such as twelve) to a string (such as "12"), outputting the number's base 10 representation by d
TAG : scheme
Date : January 02 2021, 06:48 AM , By : obriot
Is it standard for Scheme interpreters to not allow if-statements without alternative clauses?
Is it standard for Scheme interpreters to not allow if-statements without alternative clauses?
I wish this help you In most Scheme interpreters if allows expressions without the "else" part, and that's what the standard says, as pointed by @codybartfast in his answer.I'm only aware of Racket enforcing the rule that if must always have both the
TAG : scheme
Date : January 02 2021, 06:48 AM , By : Deep Lakhi
A `cond` that is also a `let`?
A `cond` that is also a `let`?
will be helpful for those in need Use let*, which evaluates the initialization forms sequentially, in the scope of the brevious bindings. In the initialization forms, use and to make the calculation conditional.
TAG : scheme
Date : January 02 2021, 06:48 AM , By : Kejoa
Scheme function as parameter
Scheme function as parameter
wish helps you the program is supposed to use
TAG : scheme
Date : January 02 2021, 06:48 AM , By : FadielRas
the sum of the all integers from a to b, What's Wrong With My Code?
the sum of the all integers from a to b, What's Wrong With My Code?
Hope that helps The recursive step is incorrect. Assuming that a
TAG : scheme
Date : January 02 2021, 06:48 AM , By : user5990960
How do I pass (not f) as an f?
How do I pass (not f) as an f?
I hope this helps . the not function has the signature Any -> Boolean. And is essentially:
TAG : scheme
Date : January 02 2021, 06:48 AM , By : danielfos
scheme homework Blackjack shuffle
scheme homework Blackjack shuffle
it should still fix some issue There is a better way to shuffle a deck like that. With your method it's possible that there is a group of cards that stay in order.It's better to loop through the deck and for each card swap it with a random position.
TAG : scheme
Date : January 02 2021, 06:48 AM , By : user3860457
Generating list of million random elements
Generating list of million random elements
Does that help It really depends on the system you're using, but here's a common way to do that in plain scheme:
TAG : scheme
Date : January 02 2021, 06:48 AM , By : user3854666
How to return a function in scheme (racket) using conditionals?
How to return a function in scheme (racket) using conditionals?
seems to work fine cond works like this:
TAG : scheme
Date : January 02 2021, 06:32 AM , By : Tunggul
#f output for scheme result inside repl.it
#f output for scheme result inside repl.it
wish helps you I think it's worth thinking about how many tests you have to do to compute these things: to compute the extremum of three elements under any ordering operator you need to do no more than three comparisons:
TAG : scheme
Date : January 01 2021, 06:10 PM , By : Anon
Why doesn't my counter work with the function "alternate"?
Why doesn't my counter work with the function "alternate"?
it fixes the issue The problem is that alternate is executing exactly once and returning a single lambda as its result - instead of that you want to apply it every time. This should work:
TAG : scheme
Date : January 01 2021, 06:44 AM , By : user3091232
Approximation for Euler number using do loop (Scheme)
Approximation for Euler number using do loop (Scheme)
like below fixes the issue I am trying to calculate and approximation for the Euler number using a do loop in Scheme , You need to update the sum variable and also return its value:
TAG : scheme
Date : December 31 2020, 08:18 AM , By : user3090450
SRFI notational conventions
SRFI notational conventions
help you fix your problem This notation for optional arguments is not only used here. It is also used in Unix program usage.
TAG : scheme
Date : December 25 2020, 09:01 PM , By : Juan
Racket - require an entire directory of files
Racket - require an entire directory of files
I hope this helps . If you prefer not to create a package (which means you need to require relatively): If dynamore contains only those three files, you can use reprovide-lang's glob-in as follows: (require (glob-in "dynamore/*.rkt")).
TAG : scheme
Date : December 25 2020, 07:30 PM , By : user3078158
Is quote in Lisp/Scheme same as a string?
Is quote in Lisp/Scheme same as a string?
I hope this helps you . There are already many questions regarding quote in Lisp, and I understand that it doesn't evaluate the expression. But I haven't seen its comparison to a string. , In Lisp:
TAG : scheme
Date : December 25 2020, 06:31 AM , By : user3070334
Is there a Racket builtin to repeat an element n times as a list?
Is there a Racket builtin to repeat an element n times as a list?
I hope this helps . Python's ["arbitrary string"] * 5 can be translated to (make-list 5 "arbitrary string") in Racket. However, that's often not what you want, because elements are shared. This is totally fine for immutable values, but for mutable va
TAG : scheme
Date : December 25 2020, 02:01 AM , By : user3069557
Using a syntax macro inside of itself in Racket
Using a syntax macro inside of itself in Racket
hop of those help? Originally a comment, but ran out of space:I won't rule out the possibility that one can cheat the system, but ... .
TAG : scheme
Date : December 23 2020, 02:30 PM , By : user3063528
How do I scale values all the values in a list where the largest value is 1 and the smallest value is 0
How do I scale values all the values in a list where the largest value is 1 and the smallest value is 0
wish help you to fix your issue I am trying to scale all the values in a list where the largest value is 1 and the smallest value is 0. Here is an example of what I am trying to accomplish , Here is a variation of your function:
TAG : scheme
Date : November 27 2020, 12:01 PM , By : user3041985
What is the difference between a symbol and its name?
What is the difference between a symbol and its name?
To fix this issue Symbols are, at the simplest level, names with identity. That's what you want in any programming language for identifiers: if, when the compiler is looking at some code, it sees some variable name foo it needs to know that it is the
TAG : scheme
Date : October 06 2020, 10:00 AM , By : Tiger Global Ltd
GIMP: test.scm gets "unbound variable" error when run
GIMP: test.scm gets "unbound variable" error when run
fixed the issue. Will look into that further With a hint from @souser12345, the problem turns out to be with the command line. Surrounding the *.png with grave accents like this:
TAG : scheme
Date : October 06 2020, 08:00 AM , By : Riztezze
Can any case of using call/cc be rewritten equivalently without using it?
Can any case of using call/cc be rewritten equivalently without using it?
Hope that helps The key to the direct answer here is the notion of "Turing equivalence". That is, essentially all of the commonly used programming languages (C, Java, Scheme, Haskell, Lambda Calculus etc. etc.) are equivalent in the sense that for an
TAG : scheme
Date : October 06 2020, 05:00 AM , By : RHITNL
Is the function argument to `call/cc` written in CPS?
Is the function argument to `call/cc` written in CPS?
it fixes the issue No.CPS-styled functions expect other normal functions as their argument(s), and may call them in tail position. These functions are confusingly called "continuations" in Scheme vernacular. I prefer "contingencies", to disambiguate.
TAG : scheme
Date : October 05 2020, 08:00 PM , By : Carlos Díaz
How does call/cc work with the CPS transformation from "Lisp in Small Pieces"?
How does call/cc work with the CPS transformation from "Lisp in Small Pieces"?
it should still fix some issue I do not understand how this can work because there is no distinction between application of functions and continuations.
TAG : scheme
Date : October 03 2020, 03:00 PM , By : Masabata Motlhabane
Any way to map functions with more than one argument in Scheme/Racket?
Any way to map functions with more than one argument in Scheme/Racket?
I hope this helps you . I'm currently doing an introductory course in Racket/Scheme, and am currently studying map, apply, and fold. For the most part, I've been assuming that map can only work on lambdas that accept a single argument. However, for c
TAG : scheme
Date : September 30 2020, 07:00 PM , By : Bharath
How to fix this code in Scheme, where I am trying to find the last two elements in the list
How to fix this code in Scheme, where I am trying to find the last two elements in the list
Does that help A procedure returns the value of the last expression that's executed in the body. In your procedure, when one of the first if conditions is true, you don't return the value from the procedure, you just go on to test the next condition.
TAG : scheme
Date : September 28 2020, 03:00 AM , By : Charles Calvert
SICP Exercise 1.3 strange behavior of solution
SICP Exercise 1.3 strange behavior of solution
wish helps you So this can easily be explained by substitution: (solution 2 3 4) is the same as:
TAG : scheme
Date : September 26 2020, 07:00 PM , By : Abhishek Singh
Return a predecessor for a given value and given list
Return a predecessor for a given value and given list
wish of those help So here is how to fix this. You make a helper that takes additional arguments. One of those can be the previous element. eg.
TAG : scheme
Date : September 26 2020, 03:00 PM , By : user6081188
Racket language output issue
Racket language output issue
Hope that helps I am working on an assignment in racket. It looks at a list, does a simple math calculation, then outputs the info from the list. Heres the function that does the outputting. , As the comment says, you just need to do this:
TAG : scheme
Date : September 26 2020, 12:00 AM , By : Sethu eesysite.com
Syntax and variables in Scheme
Syntax and variables in Scheme
this one helps. or is a special form. It isn't a function. So it can not be passed like that as an argument. Rather than (apply f t or), you must use:
TAG : scheme
Date : September 23 2020, 10:00 PM , By : ezgoin33x
Scheme less than average function
Scheme less than average function
this will help Sure, let's do this step by step!First off, let's define a function to get us the average of a list. We'll call this function mean.
TAG : scheme
Date : September 23 2020, 12:00 PM , By : Guanbo Wang
shadow
Privacy Policy - Terms - Contact Us © festivalmusicasacra.org