Questions tagged [lisp]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
1 vote
0 answers
120 views

Simple proof that Lisp expresses all computable list functions

Given computable function $f : LispTerm \rightarrow LispTerm$ is it possible to implement it in Lisp? The $LispTerm$ is any term that is constructed using cons, <...
prog's user avatar
  • 93
0 votes
1 answer
85 views

Continuation passing transform

I'm stuck on something in in Shan's article Shift to Control, about CPS. On page three he writes the CPS transform ...
Eric Auld's user avatar
  • 115
2 votes
1 answer
104 views

SICP: Pascal's triangle problem

I was reading SICP and was solving a problem that asked to create a function in lisp for finding elements of Pascal's triangle. The way I went about it is to take input as the row number and then ...
Varun Patel's user avatar
1 vote
0 answers
51 views

Delayed "let" in SICP

In section 3.5.4 , i saw this block: ...
user137213's user avatar
2 votes
2 answers
275 views

Lambda Calculus Conversion

How can I take a Haskell data type or function (eg fold, list, String, zip) and convert or translate it to a lambda calculus abstraction? Example: If sum computes a sum of all elements in a list, and :...
Zuckerbrenner's user avatar
1 vote
1 answer
527 views

Is JavaScript a homoiconic language?

I can't help but notice the uncanny resemblence JavaScript has to LISP. JSON (JavaScript Object Notation), for instance, is a data structure that can be reconstituted into an object by subjecting it ...
user148298's user avatar
0 votes
2 answers
228 views

Iteration vs Recursion question in Lisp method

I am curious if the following method would be called iterative or recursive: ...
subjectsphinx's user avatar
1 vote
0 answers
136 views

Is McCarthy Formalism first ever formalism for defining functions recursively in computer science?

McCarthy formalism is a formalism for defining functions recursively, first introduced in classic paper Recursive Functions of Symbolic Expressions and Their Computation by Machine, Part I (1960). ...
Siegmeyer's user avatar
  • 133
1 vote
1 answer
152 views

how to deduce a function subtype rule from a given function type definition

This question relates to liskov substitution principle seems to have two conventional meanings but is really a different question, so I'm posing it as a new question. I'm doing a bit of research into ...
Jim Newton's user avatar
0 votes
1 answer
465 views

What is the difference between a block and a procedure?

A procedure is a sequence of program instructions that perform a specific task, packaged as a unit (Techopedia). We use block structure to make our code more readable by using indentations and ...
Katherina Kallis's user avatar
3 votes
1 answer
83 views

Why pointer dereference was once called "decrement"?

I'm reading McCarthy's paper Recursive Functions of Symbolic Expressions And Their Computation by Machine, where when the author describes the machine implementation of lists, he writes this: a. ...
wvxvw's user avatar
  • 1,388
4 votes
1 answer
441 views

How do you represent LISP as mathematical / logical model?

I asked this in stackoverflow, but the question probably fits here better. This question arose from the objection that LISP is regarded as a functional language with some simple principles, namely ...
MarkokraM's user avatar
  • 385
1 vote
1 answer
147 views

Claimed problems with Lisp dynamic scoping

What would be the problem of running the following scala codes assuming we are working with dynamic scoping and a global stack to store environments as some variants of Lisp do? ...
user1868607's user avatar
  • 2,184
4 votes
1 answer
63 views

Description of lists with functions in LISP

I have been given the following implementation of basic list functions in LISP: ...
user1868607's user avatar
  • 2,184
13 votes
1 answer
4k views

Is this a generic way to convert any recursive procedure to tail-recursion?

It seems that I've found a generic way to convert any recursive procedure to tail-recursion: Define a helper sub-procedure with an extra "result" parameter. Apply what would be applied to the ...
nalzok's user avatar
  • 1,081
5 votes
0 answers
202 views

Why did the Mathematica Language choose term rewriting instead of the Lambda Calculus as its basis? [closed]

Now we can see that Church was associated with the Simply Typed Lambda Calculus. Indeed, it seems he explained the Simply Typed Lambda Calculus in order to reduce misunderstanding about the Lambda ...
hawkeye's user avatar
  • 1,199
4 votes
1 answer
117 views

How did MacLisp's garbage collector "run in the register set"?

Olin Shivers, ‘History of T’: Maclisp on the [PDP]-10 had used a mark&sweep GC (one version of which famously "ran in the register set," though that is another story) This implies, in my ...
Daphne Preston-Kendal's user avatar
2 votes
1 answer
607 views

Can we prove mathematical induction statements in Lisp?

My previous question Can we prove that $1 + 2 + \dots + n = \frac{n(n+1)}{2}$ using a computer program? has a problem that it tries to cover too much ground. Here is a related question motivated by ...
john mangual's user avatar
  • 1,931
0 votes
1 answer
100 views

Suggestions for Short Examples Contrasting Functional Programming Languages [closed]

A fellow student and I are writing a paper on functional programming for a programming languages course, part of which will be comparing and contrasting Lisp (Scheme), ML (SML), and Haskell. We'll be ...
joeA's user avatar
  • 139
1 vote
1 answer
211 views

How does time/space complexity work with lisp

I'm completely new to programming but I've had a course in computational complexity. I'm trying to read the book "Structure and Interpretation of Computer Programs." In the first few sections, the ...
dessin d'enfant terrible's user avatar
0 votes
1 answer
158 views

Mathematical Induction Problem from Concrete Abstractions

This is a problem from 'Concrete Abstractions' which is available free on the web[1]. It's a book similar to SICP. The problem: Exercise 2.16 Consider the following procedure foo: ...
douglas's user avatar
  • 15
9 votes
2 answers
2k views

Is it possible to do Dependent Types in Typed Racket?

Is it possible to use Dependent Types in the existing Typed Racket implementation? (ie do they exist in it?) Is it reasonably possible to implement a Dependent Types System using Typed Racket?
hawkeye's user avatar
  • 1,199