Lisp is a (family of) general purpose programming language(s), based on the lambda calculus, and with the ability to manipulate source code as a data structure.

learn more… | top users | synonyms

6
votes
4answers
839 views

Finding the sum of all the multiples of 3 or 5 below 1000

As a Lisp (and functional programming) newbie, I wrote the following code that finds the sum of all the multiples of 3 or 5 below 1000, and I suspect that it is lousy: ...
5
votes
0answers
574 views

Merge sort in Scheme

...
3
votes
3answers
1k views

(Common Lisp) Print an Integer and its Digits Reversed

This common lisp program is an exercise to print an integer and its digits reversed to the screen. ...
2
votes
2answers
661 views

(Scheme) Use Newton's Method to compute sqrt(x)

Given the following task: Use Newton's method to compute the square root of a number. Newton's method involves successive approximation. You start with a guess, and then continue averaging ...
1
vote
1answer
155 views

(Common Lisp) Find epsi

4.2 Machine Epsilon. Find the floating point number epsi that has the the following properties: 1.0+epsi is greater than 1.0 and Let m b e any number less than epsi. Then 1.0+m is ...
0
votes
1answer
143 views

(Scheme) [SICP ex. 2.40] unique-pairs

From the section called Nested Mappings Exercise 2.40. Define a procedure unique-pairs that, given an integer n, generates the sequence of pairs (i,j) with 1< j< i< n. Use ...