Skip to main content

Questions tagged [scheme]

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

1 vote
2 answers
364 views

In Common Lisp, we have to use the let form to declare a new lexically-scoped variable. This means that the code either looks like that written in C89 (all variables declared on top of scope), or ...
ndsrib's user avatar
  • 19
0 votes
0 answers
719 views

The traditional (Scheme, Pascal) way to structure code is this: declare outer function declare inner function body of inner function body of outer function The where clause in Haskell moves ...
ceving's user avatar
  • 401
4 votes
0 answers
1k views

I'm looking at creating a class which accepts a string to define a Unix socket address. Linux supports three types of addresses for Unix sockets: File based addresses (also called named domain ...
Alexis Wilke's user avatar
0 votes
1 answer
127 views

I'm reading SICP, and I don't understand how Lamé's Theorem gives us an estimate for the order-of-growth of Euclid's algorithm (the relevant passage is below). It would make sense to me if the ...
cnnrmnn's user avatar
  • 11
3 votes
3 answers
1k views

I'm currently reading through Structure and Interpretation of Computer Programs (SICP). During the course of that book, the lesson of "you can optimize recursive procedures by writing them as ...
J. Mini's user avatar
  • 1,015
1 vote
1 answer
119 views

In Scheme, the general form of a procedure definition is: (define (<name> <parameters>) <body>) where <body> accepts a sequence of expressions, allowing this kind of procedure ...
Géry Ogam's user avatar
0 votes
1 answer
37 views

I am reading "Revised^5 Report on the Algorithmic Language Scheme," "1.3.1. Primitive, library, and optional features." In particular, implementations must support portable code by providing a ...
beroal's user avatar
  • 109
4 votes
3 answers
656 views

Why aren't lisp keywords protected? For example, (define a 3) (define define +) #makes define useless (define a 1) #outputs 4, instead of assigning 1 to a. Is this flexibility so important? Or even ...
Quora Feans's user avatar
1 vote
1 answer
518 views

I'm programming a small lisp/scheme interpreter and I came across the following situation : When a quoted list contains lambdas, they are not parsed as lambdas. Here is a sample code (live on repl....
Julien__'s user avatar
  • 249
7 votes
2 answers
954 views

What is the smallest practical set of primitives that can be used to define the Scheme language? For example, map can be defined as (define (map proc lis) (cond ((null? lis) '()) ...
Robert Harvey's user avatar
0 votes
1 answer
847 views

I am trying to think of an implementation of a two dimensional matrix-like data type. Normally I would take an array of arrays but I'm bound to a relatively low language level which only provides ...
Benjoyo's user avatar
  • 162
22 votes
4 answers
4k views

I'm learning Scheme from the SICP and I'm getting the impression that a big part of what makes Scheme and, even more so, LISP special is the macro system. But, since macros are expanded at compile-...
Elliot Gorokhovsky's user avatar
1 vote
1 answer
92 views

We currently have the following SQL Schema: Projects Budgets BudgetTabs BudgetSections BudgetTasks BudgetTaskDetails ...
Gaz's user avatar
  • 159
3 votes
0 answers
571 views

I'm completely stuck on a problem to write a function that does NOT use recursion, locals, or lambda. Only abstract list functions can be used. The function must input a list of positive integers, ...
E 4 6's user avatar
  • 31
9 votes
3 answers
12k views

In eager languages like Scheme and Python, you can use a lambda expression without parameters to delay evaluation, e.g. in Scheme (Chicken Scheme): #;1> (define (make-thunk x) (lambda () (+ x 1))) ...
Giorgio's user avatar
  • 19.8k

15 30 50 per page
1
2 3 4 5