**below is the problem i am given, after this i explain where i am at so far and the code i have created, **Write the following functions in Scheme: 1.a "digitinc4" -takes as input a 4-digit integer, and returns another 4-digit integer constructed of the original input integer's digits, each incremented. For example, (digitinc4 4833) would return 5944. When a digit is a 9, the corresponding output digit should be a 0. For example: (digitinc4 4892) would return 5903. You can assume that the input number is at least 1000 - that is, there are no leading zeros. b. Extend … |
0
76 | ||

I am currently making out the plans for the milestones for the rest of this year in my long-term projects (Thelema, Assiah, and Alfheim). I was hoping that someone would be able to review these plans and help me determine which are feasible in the next four months. The overall goal, which I project to take at least until the end of next year, is to develop a rudimentary compiler and REPL for my language project, [Thelema](https://github.com/Schol-R-LEA/Thelema). I am currently focusing on the lower-level toolchain which will support the language, which will consist of an assembler, [Assiah](https://github.com/Schol-R-LEA/Assiah), and a library … |
0
21 | ||

**note:** This was also posted to the [comp.lang.scheme](https://groups.google.com/forum/#!forum/comp.lang.scheme) earlier today. I normally wouldn't cross-post, but after I noticed the extremely low traffic on the newsgroup, I decided to try a more active, if less specialized, forum. As part of a larger project, I am writing a macro that defines a variable and binds it to a list of pairs, where most of the pairs map a pattern and a value. Each pattern is a list, which may have a combination of symbols and strings. I am something of a novice with (define-syntax), and have struggled to get this to where … |
0
21 | ||

I have built this function which calls a couple other functions to get the oprator and numbers for an arithmetic operation but I get the error `function call: expected a function after the open parenthesis, but received '+`. normaly you invoke addition as (+ 5 6) and multiplication as (\* 4 9) ect. So I thought you could call a function that would get each piece but I cant seem to get it to work. Here is what I have: (define calculate (lambda (x) ((getOperator x) (getOperand1 x) (getOperand2 x)) ) ) Detailed explanations as to the reasons why what … |
0
28 | ||

Hello, I need help finishing up an unzip function which takes a zipped list and returns a list of two lists. The result I want is as follows. . . (unzip '((a b)(1 2))) ((a 1)(b 2)) (unzip '((a 1)(b 2)(c 3))) ((a b c)(1 2 3)) (unzip '(unzip '())) (() ()) I can get my code to work for the null case and with a list containing two lists, but I'm haveing a hard time figuring out how to make it recursive and work for more than 2 lists such as the second example. (define (unzip l) (if (null? … |
0
13 | ||

Hello, I have been trying everyhting and I still have not gotten any good results for my cholor sheme. I need the scheme to go well with yellow, green, and red. I know random colors that dont really go well together. But Ive tried black but it makes my site look to intemidating. Does anyone have any good ideas? |
0
14 | ||

Hey all; I've been reading SICP and been wanting to write code from the book and the solutions to exercises and execute that code. I find MIT-GNU Scheme, the recommended interpreter, to be very confusing and very slow or impossible to use. I can't even get some of the basic keyboard shortcuts to work. PLT Scheme (Dr Scheme 4.2.5) throws up error messages all the time, even if I copy right out of SICP (it can't seem to understand 'nested' definitions). I want to get the SICP-type Scheme interpreter working on, say, Notepad++, so that I can type easily and … |
0
10 | ||

if bit? is a procedure that takes an item and returns #t if the items is 1 or 0 and #f otherwise (define bit? (lambda (item) (if (equal? item 0) #t (if (equal? item 1) #t #f)))) how can i use bits? to define roll-out that takes a list of non-negative integers and returns the list where each non-bit has been divided into halves, as shown below. When an odd integer is split into two, the second integer is larger i.e (roll-out '(5 8 4 0 2 7 1 11)) (2 3 4 4 2 2 0 1 1 3 … |
0
13 | ||

I have been trying to make my websites looks and when ever i make a top banner that spreads across the page, it looks ugly and childish. Can someone tell me how to make a nice banner like daniweb which is appealing. |
0
5 | ||

I don't know if this is the right place for a post about Scheme, but i was wondering if anyone knew if there are loops and if statements in Scheme? (I am very new to Scheme, i know there are 'cond' statements, but i don't know if there are if's, or if there's a difference between the two) if there are in fact loops, an example of the syntax would be greatly appreciated. Thanks. |
0
13 | ||

why arr[-2] gives value? |
0
5 | ||

Could someone help me to convert this Scheme Code to Objective-C? (define-type RCFAE [num (n number?)] [add (lhs RCFAE?) (rhs RCFAE?)] [id (name symbol?)] [fun (param symbol?) (body RCFAE?)] [app (fun-expr RCFAE?) (arg-expr RCFAE?)] [with (id symbol?) (named-expr RCFAE?) (body RCFAE?)] [if0 (cond RCFAE?) (then RCFAE?) (else RCFAE?)] [rec (id symbol?) (named-expr RCFAE?) (body RCFAE?)]) (define (subst e1 x e2) (type-case RCFAE e1 [num (n) e1] [add (l r) (add (subst l x e2) (subst r x e2))] [id (y) (if (symbol=? x y) e2 (id y))] [app (f a) (app (subst f x e2) (subst a x e2))] [fun … |
0
7 |

The End.