common-lisp Questions
4
Solved
I just started learning Common Lisp a few days ago, and I'm trying to build a function that inserts a number into a tree. I'm getting an error,
*** - SYSTEM::%EXPAND-FORM: (CONS NIL LST) should ...
Bish asked 4/4, 2010 at 20:44
1
Solved
I am a Common Lisp newbie who's beginning to learn the language. My question is: I've seen several functions use the predicate syntax in different ways. For example (just looked this up), there is ...
Feodore asked 26/3, 2013 at 15:27
1
Solved
We have been given homework from lisp where I need to use "cyclic" list (I don't know what is the right naming for this). By "cyclic" list, I mean list, where cdr of the last one cons points ...
Rearm asked 20/3, 2013 at 23:13
5
Solved
For example, I pass the function name to another function
(personal-function 'func-name '(attr1 attr2 ...))
and what I want to do is
(defun personal-function (func-name)
(defun func-name '(at...
Cycad asked 22/9, 2010 at 18:15
5
Solved
I find myself in a situation when I need to combine several predicate into one. Is there a standard way of doing this, something similar to compliment?
Suppose there are several simple predicates ...
Dentelle asked 18/3, 2013 at 11: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
5
Solved
I am a LISP newbie.
To get the running sum of a list, I am writing like --
(setf sum 0.0)
(mapcar #'(lambda(x)
(setf sum (+ sum x)) sum) values))
For example, if you give '(1 2 3 4) as input...
Levantine asked 12/3, 2013 at 23:5
1
Solved
Doing a SWIG tutorial, and using the example.c, example.i as they provided there. I generated lisp file with swig -cffi example.i.
But when I run test.lisp with SBCL, i get a complaint about unde...
Shallop asked 11/3, 2013 at 19:46
2
Here's a quote from Ron Garret's "Lisping at JPL":
"Debugging a program running on a $100M piece of hardware that is 100 million miles away is an interesting experience. Having a read-eval-print l...
Capercaillie asked 4/3, 2012 at 14:45
1
Solved
Can you please explain the differences between the three symbols proclaim, declaim and declare?
Scintillometer asked 11/2, 2013 at 14:14
2
Solved
I have a set of functions named "ip", "date", "url" etc.
With these, I want to generate another set of functions "ip-is", "date-is" etc.
I finally have the following solution, thats working fine,...
Extenuate asked 10/2, 2013 at 14:49
2
Solved
So, I have read from
setq and defvar in lisp,
http://www.cs.ucf.edu/courses/cop4020/spr2006/plsetup.html, and
In Lisp, how do I fix "Warning: Assumed Special?"
among other places abou...
Curt asked 14/1, 2013 at 7:50
1
Solved
Is there a way to find all of the functions that specialize on a given type?
I envision something you could execute from the repl like (find-all-specializing-methods 'my-class) and it would retur...
Mahratta asked 11/1, 2013 at 10:10
2
How do I figure out how many bytes a defclass object has in Common Lisp?
Yuu asked 13/9, 2010 at 17:8
3
Solved
I know that when you want to make a dynamic/global binding in Lisp, you use either defparameter or defvar. I also know that you can make lexical bindings, well, almost everywhere, using defun argum...
Skell asked 26/12, 2012 at 9:46
3
Solved
The question is not about using keywords, but actually about keyword implementation. For example, when I create some function with keyword parameters and make a call:
(defun fun (&key key-para...
Puttergill asked 25/12, 2012 at 6:17
2
Solved
In chapter 3 of Practical Common Lisp book there's an example of a SQL-like select and where functions. Here's a simplified version of it:
(defun where (x)
#'(lambda (item)
(> item x)))
an...
Accusative asked 24/12, 2012 at 13:21
2
Solved
There is something I can't understand about Common lisp.
Assume I'm writing a macro similar to this:
(defmacro test-macro ()
(let ((result (gensym)))
`(let ((,result 1))
(print (incf ,result...
Glycosuria asked 21/12, 2012 at 9:1
1
Solved
I am calling my common-lisp program via a shellscript which calls sbcl with the necessary parameters and I have to guarantee that anyhow the actual program finishes the call will end clean with som...
Tortuous asked 21/12, 2012 at 2:21
2
Solved
In Python there are functions all and any they return true if all or some elements of a list are true respectively. Are there equivalent functions in Common Lisp? If not, what is the most succinct ...
Severance asked 18/12, 2012 at 19:30
1
Solved
What's the correct way to load quicklisp at the start of my program? I'm currently copy/pasting in the block that quicklisp inserted into my .eclrc, e.g.
;;; quicklisp
(let ((quicklisp-init (merge...
Rhomb asked 17/12, 2012 at 0:34
1
Solved
I'm in search for a better technique for doing it. My general struggle is with the fact that debugger enters either too late or too early to be able to catch the value of the variables.
What I tri...
Caritacaritas asked 7/12, 2012 at 22:48
1
Solved
I'm trying to get familiar with a large project, possibly, initially written in Allegro Common Lisp. I have come across this piece of code:
(load "epilog:lib;compile.lisp")
Could please anyone e...
Puny asked 1/12, 2012 at 17:6
1
Solved
That is, a form that evaluates child forms in order and returns the last evaluated value,e.g.
(do (println "Hello World") 3) => 3
Rotifer asked 19/11, 2012 at 9:54
2
Solved
While working through Peter Seibel's book Practical Common Lisp, I've had some difficulty understanding how to handle the Common Lisp package system in conjunction with Emacs's SLIME and quicklisp....
Scholasticate asked 18/11, 2012 at 5:4
© 2022 - 2024 — McMap. All rights reserved.