Scheme is a functional programming language that is a dialect of Lisp. It has a minimalist design with a standard specification and many implementations.

learn more… | top users | synonyms

0
votes
1answer
76 views

Continuations, coroutines, and tail-call optimization

I am trying to learn continuations and use them to implement coroutines in Scheme. I have two procedures (coroutines) a and b, and I switch between them in the following way: ;; c is a continuation. ...
0
votes
0answers
16 views

Is my implementation of a merge sort correct? [migrated]

I tried to get into programming several times but never did and never got very far past "Hello, World.", until recently when I found and read (most of, still don't get parts of it) "The Little ...
4
votes
1answer
85 views

Tail-recursive implementation of take-while

I am trying to write a tail-recursive implementation of the function take-while in Scheme (but this exercise can be done in another language as well). My first attempt was (define (take-while p xs) ...
2
votes
3answers
248 views

If Scheme is untyped, how can it have numbers and lists?

Scheme is said to be just an extension of the Untyped Lambda Calculus (correct me if I am wrong). If that is the case, how can it have Lists and Numbers? Those, to me, look like 2 base types. So I'd ...
3
votes
1answer
167 views

“Final” Scheme REPL definitions: how to save them?

Is there a way to show and save all "final" definitions entered into a Scheme REPL into a text file? Say, if I have defined in the REPL: (define (increase x) (+ 1 x)) (define (multbytwo x) ...
8
votes
5answers
858 views

Wrapping my mind around prefix notation?

I'm reading about LISP. I understand how prefix notation works at a certain level, but I was wondering if there are any tricks to making it intuitive.
-1
votes
1answer
67 views

Designing XML - confused between attributes and elements [closed]

I have to design an xml structure to set standard data exchange with my client. We deal with payments and its related data. At now, my XML data looks like this: <PAYMENTS> ...
5
votes
1answer
137 views

What features does MIT-Scheme have that make it ideal for SICP?

I've been thinking about trying to get through the SICP again, this time well-armed with a better idea of what the SICP is meant to accomplish, and being older and wiser than my first attempt back in ...
5
votes
1answer
238 views

What's the difference between lists constructed by quote and those constructed by cons in Scheme?

(define ls1 '((1 . 2) 1 . 2)) (set-car! (car ls1) 6) ls1 (define ls2 (cons '(1 . 2) '(1 . 2))) (set-car! (car ls2) 6) ls2 After set-car!ing, ls1 will be ((6 . 2) 1 . 2) and ls2 ((6 . 2) 6 . 2). It ...
4
votes
3answers
323 views

Obscurity of Lisp in collaborative projects [closed]

I'm playing with the idea of learning Scheme but I have a few misgivings. From what I understand Lisp makes heavy use of macros that allow programmers to drastically change the language itself. I ...
27
votes
11answers
8k views

Scheme vs Haskell for an Introduction to Functional Programming?

I am comfortable with programming in C and C#, and will explore C++ in the future. I may be interested in exploring functional programming as a different programming paradigm. I am doing this for fun, ...
3
votes
2answers
371 views

Is there any particular reason for the use of lists over queues in functional programming languages?

Most functional programming languages such as Scheme and Haskell use lists as their main data structure. Queues are identical to lists, except for the fact appending to the end - not to the begin - ...
5
votes
1answer
179 views

Why does DrRacket IDE considers some identifiers as “symbols” and some as “keywords”? What is the difference?

Why does DrRacket (kind of Scheme) IDE highlights some of the identifiers as "keywords" (for example define, lambda, send*), and the others as "symbols" (user defined identifiers, +, -, abs, send, ...
3
votes
4answers
231 views

In Scheme, what is formally a program's state?

I think i've understood more or less what a parsed Scheme program looks like (a binary tree with atomic values on the leaves, if i have understood correctly). Can anybody please define to me, or give ...
2
votes
3answers
224 views

Why it is `(cons 1 (cons 2 (cons 3 nil)))` and not `(cons 3 (cons 2 (cons 1 nil)))` for [1,2,3]?

Is there any special reason that to construct list in Scheme you use (cons 1 (cons 2 (cons 3 nil))) instead of (cons 3 (cons 2 (cons 1 nil))) ? While the first seems more obvious because it ...
64
votes
11answers
6k views

Why is Scheme my first language in university?

I hear about C, C++, Java every day whenever people starting talking about computer science, but in my first computer science class we are asked to write in Scheme (DrRacket). Why is that? What ...
6
votes
1answer
349 views

SICP - Why use accumulate with cons when filter already passes back a list

In SICP 2nd Edition section 2.2.3, the authors have the following code: (define (even-fibs n) (accumulate cons nil (filter even? (map fib ...
8
votes
1answer
935 views

What implementation of Scheme is good for studying SICP? [closed]

I heard about Dr. Scheme but haven't really used it. What is your experience with SICP, what set of scheme tools did you use when learning SICP?
1
vote
1answer
150 views

Is R6RS backwards compatible with R5RS?

Is the new Scheme standard, R6RS which was published in 2007, backwards compatible with the older standard R5RS? If not, is there a compatibility mode in R6RS?
1
vote
2answers
284 views

Multiple Data Types for Single Variable in C

I am trying to implement basic cons, car and cdr of SCHEME in C. I have made a simple program that allows me to cons two integers as shown in the main program. However, I want my program to be able to ...
7
votes
4answers
702 views

What makes Common Lisp “big”?

I've been learning both Common Lisp and Racket, and one thing that I consistently hear is that Racket is a much "smaller" language than Common Lisp. I was wondering what this really meant. As far as I ...
0
votes
1answer
81 views

Show all definitions in Scheme?

I want to see all user-made definitions in a Scheme REPL, both loaded from files and entered at the REPL. Is there any way to "dump all definitions"? E.g. if there is: (define (plusone x) (+ 1 ...
3
votes
1answer
568 views

Online courses focussed on learning LISP for beginners? [closed]

I'm looking for an online course that I can use to learn programming using Lisp (especially Scheme), from scratch. I didn't find anything similar on Coursera/Udacity - the only resource I found was on ...
0
votes
1answer
161 views

In what way is JavaScript (ECMAScript) similar to Self and Scheme

When looking at the ECMAScript 4th Edition specification here it mentions that ES3 is a simple, highly dynamic, object-based language that takes its major ideas from the languages Self and ...
112
votes
18answers
42k views

Is LISP still useful in today's world? Which version is most used?

I try to teach myself a new programming language in regular intervals of time. Recently, I've read how Lisp and its dialects are at the complete opposite end of the spectrum from languages like C/C++, ...
3
votes
2answers
517 views

What is a dotted pair's analogy in other Lisp implementations?

What is Scheme's dotted pair construct analogous to in other Lisp implementations? I can make a vector or list quite easily, and understand those in Clojure, even though the syntax is a little ...
7
votes
6answers
892 views

Reading SICP with F#? [closed]

I've been meaning to read the SICP book for a while, and am finally about to get around to it (now that I can read it on Kindle :) I'd like to learn a functional language, and I use C# at work so ...
7
votes
2answers
273 views

Who first coined the term Higher Order Function and/or First Class Citizen?

I've come to understand that long before Haskell, O'Caml or LISP, higher order functions were an academic research subject and in mathematics, Schönfinkel (in 1967) and Haskell Curry (in 1968) already ...
24
votes
2answers
2k views

Applying Denotational Semantics to design of Programs

I've read a bit on denotational semantics (DS) and I'm very intrigued about the process of designing computer programs where types and functions have strong and clear mappings to mathematics. Are ...
19
votes
6answers
2k views

Is there a language more general than Lisp? [closed]

I've been programming for a long time, and writing in Lisp (well, mostly Scheme) for a little less. My experience in these languages (and other functional languages) has informed my ability to write ...
0
votes
1answer
111 views

What is the meaning of # in R5RS Scheme number literals

There is a partial answer on Stack Overflow, but I'm asking something a teeny bit more specific than the answers there. So... Does the formal semantics (Section 7.2) specify the meaning of such a ...
4
votes
3answers
302 views

Is Reading the Spec Enough? [closed]

This question is centered around Scheme but really could be applied to any LISP or programming language in general. Background So I recently picked up Scheme again having toyed with it once or twice ...
8
votes
9answers
2k views

OS choice for functional developing

I'm mainly a .NET developer so I normaly use Windows/VisualStudio (that means: I'm spoiled) but I'm enjoying Haskell and other (mostly functional) languagues in my spare time. Now for Haskell the ...
19
votes
6answers
2k views

how a pure functional programming language manage without assignment statements?

When reading the famous SICP, I found the authors seem rather reluctant to introduce the assignment statement to Scheme in Chapter 3. I read the text and kind of understand why they feel so. As ...
3
votes
3answers
372 views

Can't understand example using continuations

I'm reading the r6rs Scheme report and am confused by the explanation of continuations (I find it to be too dense and lacking of examples for a beginner). What is this code doing and how does it ...
2
votes
2answers
354 views

Why does Scheme r5rs have no module system

With all the controversy surrounding scheme r6rs, I stuck with r5rs and I am wondering why the designers decided to not implement a module system. How does one organize code in this?
6
votes
3answers
644 views

Am I getting Scheme wrong?

Inspired by the numerous posts about the importance of learning Lisp/Scheme I started to learn Scheme two days back, I am using the book "The little Schemer" and have completed half of it. But I ...
2
votes
2answers
416 views

What are examples of Lisp's accomplishments? [closed]

I've more than once heard that sometimes a few individuals come up with great accomplishments from using Lisp. What are those refering to? What are concrete examples of people using Lisp to create ...
13
votes
5answers
1k views

How useful are Lisp macros?

Common Lisp allows you to write macros that do whatever source transformation you want. Scheme gives you a hygienic pattern-matching system that lets you perform transformations as well. How useful ...
3
votes
2answers
1k views

Scheme Stream Implementation

After working my way through SICP I decided to work though some Project Euler problems using scheme. In this particular problem I am trying to generate an infinite stream of integers however I am ...
8
votes
3answers
1k views

Why do .NET modules separate module file names from namespaces?

In implementations of the Scheme programming language (R6RS standard) I can import a module as follows: (import (abc def xyz)) The system will try to look for a file $DIR/abc/def/xyz.sls where $DIR ...
5
votes
1answer
484 views

What benefits do I get from learning Scheme?

I'm a java programmer and I've decided to learn a bit about theoretical computer science. I don't have a degree in that and a little background would help me a lot since I don't know anything other ...
88
votes
5answers
20k views

Scheme vs Common Lisp: Which characteristics made a difference in your project? [closed]

There are no shortage of vague "Scheme vs Common Lisp" questions on both StackOverflow and on this site, so I want to make this one more focused. The question is for people who have coded in both ...
10
votes
4answers
819 views

What should I learn from Scheme?

I was wondering what unique features I can learn from Scheme that would help me become a better programmer? I have a lot experience in mainstream languages, and I am looking to expand my horizons ...
17
votes
3answers
1k views

Is there a canonical tutorial or book on functional programming concepts?

Coming from a procedural/OO programming background, I tend to write Scheme programs in a procedural fashion. I would be intersted in learning Scheme or Lisp in a functional way from the ground up, to ...
6
votes
1answer
272 views

Process arbitrarily large lists without explicit recursion or abstract list functions?

This is one of the bonus questions in my assignment. The specific questions is to see the input list as a set and output all subsets of it in a list. We can only use cons, first, rest, empty?, empty, ...
11
votes
2answers
1k views

Is IronScheme complete enough or stable enough to be worth learning?

IronScheme is mentioned on Wikipedia as a successor to a failed project called IronLisp, bringing Lisp to CLR and .NET, the way Clojure does for the JVM. Does anyone have experience with this ...
14
votes
3answers
6k views

On the path to Enlightenment: Scheme, Common Lisp, Clojure? [closed]

A lot of people smarter than me keep writing about when you learn Lisp it makes you a better programmer because you "get it". Maybe all I hear about Lisp(s) changing your life is just a big practical ...
4
votes
3answers
2k views

Lisp popularity on the rise. Anyone know why? Seen this first hand?

I recently found this article/table: http://www.tiobe.com/index.php/content/paperinfo/tpci/index.html It shows a big rise in Lisp's popularity. Does anyone know more about this? What applications ...
5
votes
1answer
391 views

Where can I read exemplary Scheme code?

Edi Weitz's libraries are often brought up when people ask for exemplary code in Common Lisp, the kind to read and learn from. Are there any open-source Scheme projects or libraries that you can ...