Questions tagged [scheme]

Scheme is a functional programming language in the Lisp family, closely modeled on lambda calculus with eager (applicative order) evaluation. FOR questions about URL schemes PLEASE use the tag "URL-scheme".

Scheme is a functional programming language. It is designed to provide a mathematically well-founded language based on lambda calculus (with eager evaluation).

It follows a minimalist design philosophy specifying a small standard core with powerful tools for language extension. Its compactness and elegance have made it popular with educators, language designers, programmers, implementors, and hobbyists.

The Scheme language belongs to the Family. Since Scheme uses a single namespace for naming functions and other values, it is called a lisp-1.

Over the years, attempts at standardizing Scheme have been made including the R5RS standard, the somewhat controversial R6RS, and the most recent standard R7RS which is attempting to split the language into small and large (ongoing) standards.

Free Scheme Programming Books

Implementations

Community Websites

8110 questions
32
votes
3 answers

Dr Racket problems with SICP

I'm working through SICP. Currently, in the first chapter, I'm having problems getting Racket to let me redefine "primitives". For instance, I was under the impression that I should be able to arbitrarily do (define + 5) and that would be fine, or…
afkbowflexin
  • 4,029
  • 2
  • 37
  • 61
31
votes
3 answers

Programming Scheme(Racket) with VIM - How to get started

recently, I started programming Racket (formerly Scheme) in DrRacket. I quite fast I began to miss all the features of VIM in DrRacket, so I would like to use VIM for my scheme(racket) programming. I know that Emacs might be the best choice for…
Markus1189
  • 2,829
  • 1
  • 23
  • 32
31
votes
6 answers

What's the point of lambda in scheme?

I am learning scheme. I know how to use both lambda and let expressions. However I'm struggling to figure out what the point is of using lambda. Can't you do everything with let that you can with lambda? It would be especially helpful to see an…
Cam
  • 14,930
  • 16
  • 77
  • 128
31
votes
4 answers

Little Schemer and Racket

I'm starting to read the Little Schemer and now instead of PLT Scheme we have Racket. I would like to know if Racket is suitable for doing the exercises in the book or do I need to get another true Scheme compiler. Before I forgot to tell you, my OS…
Marcote
  • 2,977
  • 1
  • 25
  • 24
31
votes
6 answers

Separate Namespaces for Functions and Variables in Common Lisp versus Scheme

Scheme uses a single namespace for all variables, regardless of whether they are bound to functions or other types of values. Common Lisp separates the two, such that the identifier "hello" may refer to a function in one context, and a string in…
cjs
  • 25,752
  • 9
  • 89
  • 101
30
votes
4 answers

Null value in Mit-Scheme?

Can anyone tell me what is the null value representation in mit-scheme? In the SICP book, it should be "nil" but it doesn't work. Thanks.
Khue Vu
  • 3,112
  • 4
  • 37
  • 40
30
votes
6 answers

Can someone explain the concept of 'hygiene' to me (I'm a scheme programmer)?

So... I'm new to scheme r6rs, and am learning macros. Can somebody explain to me what is meant by 'hygiene'? Thanks in advance.
Cam
  • 14,930
  • 16
  • 77
  • 128
30
votes
2 answers

Definition of "lisp form"?

What exactly the definition of a "Lisp form"? As far as I know, it's "either an atom or a list that has a symbol as its first element". But then, this (in Scheme) would not be a form: ((lambda () 42)) ;; The answer to Life, the Universe and…
josh
  • 997
  • 1
  • 8
  • 13
30
votes
10 answers

"Functional programming" has a clear meaning, but does "functional language"?

I understand very clearly the difference between functional and imperative programming techniques. But there's a widespread tendency to talk of "functional languages", and this really confuses me. Of course some languages like Haskell are more…
dubiousjim
  • 4,722
  • 1
  • 36
  • 34
30
votes
2 answers

How do I handle an unspecified number of parameters in Scheme?

For example ((fn-stringappend string-append) "a" "b" "c") I know how to handle this (f x y z). But what if there's an unknown number of parameters? Is there any way to handle this kind of problem?
John
  • 827
  • 5
  • 15
  • 25
29
votes
5 answers

call/cc implementation?

I'm trying to find how call/cc is implemented. The best I've found is this Haskell snippet: callCC f = Cont $ \k -> runCont (f (\a -> Cont $ \_ -> k a)) k Although this is not as simple as I want due to the Cont and runCont. I've also found…
Pubby
  • 51,882
  • 13
  • 139
  • 180
29
votes
10 answers

Practical use of curried functions?

There are tons of tutorials on how to curry functions, and as many questions here at stackoverflow. However, after reading The Little Schemer, several books, tutorials, blog posts, and stackoverflow threads I still don't know the answer to the…
Philip Seyfi
  • 929
  • 1
  • 10
  • 24
29
votes
3 answers

When did the idea of macros (user-defined code transformation) appear?

I have read McCarthy's 1960 paper on LISP and found no reference to anything that's similar to user-defined macros or normal order evaluation. I was wondering when macros first appeared in programming language history (and also in Lisp…
Jay
  • 9,585
  • 6
  • 49
  • 72
29
votes
2 answers

Confused by the difference between let and let* in Scheme

Can anyone explain the difference simply? I don't think I understand the concept from the textbooks/sites I have consulted.
user2095626
  • 315
  • 1
  • 3
  • 7
29
votes
10 answers

Can a compiled language be homoiconic?

By definition the word homoiconic means: Same representation of code and data In LISP this means that you could have a quoted list and evaluate it, so (car list) would be the function and (cdr list) the arguments. This can either happen at…
user141335