clisp Questions
4
Solved
I'm a newbie in LISP. I'm trying to write a function in CLISP to generate the first n numbers of Fibonacci series.
This is what I've done so far.
(defun fibonacci(n)
(cond
((eq n 1) 0)
((eq n ...
4
Solved
I have a problem in understanding the performance of a Common Lisp function (I am still a novice). I have two versions of this function, which simply computes the sum of all integers up to a given ...
Coupon asked 18/5, 2013 at 16:50
7
Solved
Such as cls for cmd.exe. It's very annoy if I can't do this.
4
Solved
While looking through the "Common Lisp Quick Reference" by Bert Burgemeister, I stumbled over tailp.
First, I misunderstood the definitions of this function. And I tried:
(tailp '(3 4 5) '(1 2 3 ...
Arc asked 26/5, 2018 at 11:51
2
While reading Peter Seibel's "Practical Common Lisp", I learned that aside from the core parts of the language like list processing and evaluating, there are macros like loop, do, etc that were wri...
Buber asked 27/10, 2017 at 16:30
6
Solved
I've just started learning Lisp and I can't figure out how to compile and link lisp code to an executable.
I'm using clisp and clisp -c produces two files:
.fas
.lib
What do I do next to get a...
Pachalic asked 24/8, 2008 at 13:42
4
I am trying to update ASDF in CLISP 2.49 (on Mac OS Sierra) to version 3.x.
I have now version 2.26 of ASDF.
I have tried everything I found online: I downloaded the latest version of ASDF as indic...
Infiltration asked 11/7, 2017 at 19:38
5
It is very easy to change CLisp's current working directory:
>cat ~/.clisprc.lisp
;;; The following lines added by ql:add-to-init-file:
#-quicklisp
(let ((quicklisp-init (merge-pathnames "quic...
Dover asked 12/10, 2011 at 5:31
2
Solved
I'd like to learn more about lisp macros and I want to create a simple implementation of the defun macro.
I'm also interested in lisp's source code in all the implementations.
Austerlitz asked 26/2, 2017 at 16:17
1
TL;DR :
Even if libffi seems installed, the configure script doesn't find it even if I give it the (correct?) prefix.
/!\ The last part (*) of this post is where I'm stuck. /!\
I only put th...
Ballou asked 25/4, 2016 at 19:37
2
Solved
I'm a beginner programmer and am going through the book "Land of Lisp".
I have been typing in the examples from the book with the REPL. Is it possible to save my current program as a .lisp file s...
Bogan asked 14/9, 2011 at 23:48
2
I've written a very simple program:
(define size 2)
(print size)
When I run this code, I get following error:
*** - EVAL: undefined function DEFINE
What does the error mean? How can I resolv...
4
Solved
I am learning Lisp from the book "The Land of Lisp" by Conrad Barski. Now I have hit my first stumbling block, where the author says:
Calling yourself in this way is not only allowed in Lisp, bu...
Consistent asked 7/3, 2013 at 10:50
1
Solved
To simplify my question:
why this works
(mapcan #'(lambda (l) (list '1 '2) ) '(a b))
and this doesn't
(mapcan #'(lambda (l) '(1 2) ) '(a b))
?
I have to write a function that substitutes an...
Arteriosclerosis asked 15/2, 2015 at 11:16
3
Solved
I want to do some simulations with ACT-R and I will need a Common Lisp implementation. I have three Common Lisp implementations available: (1) CLISP [1], (2) ECL [1], and (3) SBCL [1]. As you might...
Musso asked 2/8, 2014 at 6:28
2
Solved
I installed CLisp today on my Win7 PC. Please don't criticize my environment choices, but if this particular setup has flaws relating to Quicklisp and Hunchentoot feel free to point them out. I dow...
Vaules asked 30/6, 2012 at 3:24
3
Solved
I'm learning Lisp from the book 'Practical Common Lisp'. At one point, I'm supposed to enter the following bit of code:
[1] (remove-if-not #'evenp '(1 2 3 4 5 6 7 8 9 10))
(2 4 6 8 10)
I suppose...
Cylinder asked 28/1, 2014 at 15:46
2
Solved
Given a variable with content 1, I know that it's a member of at least five types:
1 (let* ((fred 1))
2 (princ (typep fred 'bit)) (terpri)
3 (princ (typep fred 'integer)) (terpri)
4 (princ (t...
Uphemia asked 13/10, 2013 at 13:21
1
Solved
I have two items. The first, a-child, is a list which contains an array as its first element and then some strings as the remaining elements. The other, mapped, is a list which contains a number of...
Blamed asked 10/10, 2013 at 5:31
4
Solved
I have to reverse the elements of a simple (single-dimension) list. I know there's a built-in reverse function but I can't use it for this.
Here's my attempt:
(defun LISTREVERSE (LISTR)
(cond
(...
Partridge asked 19/4, 2012 at 2:41
2
How do I figure out how many bytes a defclass object has in Common Lisp?
Yuu asked 13/9, 2010 at 17:8
1
Solved
I am currently reading ANSI Common Lisp by Paul Graham, and I have a question about writing lambda expressions.
Do we need to prefix a lambda expression with #'?. If I write something like this i...
Beefy asked 3/11, 2012 at 21:21
2
Solved
Now i have to copy the hastable to a list before sorting it:
(defun good-red ()
(let ((tab (make-hash-table)) (res '()))
(dotimes (i 33) (setf (gethash (+ i 1) tab) 0))
(with-open-file (stream ...
1
ith the code below, even though (I believe) I'm only using local variables in each function, the result after running multiple times looks like data remain in variables and it ends up adding old &a...
Feints asked 17/3, 2012 at 7:54
1
Solved
I've stared at Steele's Common Lisp the Language until I'm blue in the face, and still have this question. If I compile:
(defun x ()
(labels ((y ()))
5))
(princ (x))
(terpri)
this happens:
ho...
Drying asked 26/2, 2012 at 21:0
1 Next >
© 2022 - 2024 — McMap. All rights reserved.