lisp Questions
4
Solved
I'm new to Scheme, have been using MIT Scheme for sometime now. I'm trying to understand how to implement popular graph algorithms like the shortest path algorithms, BFS, DFS. Are there any tutoria...
Behave asked 27/1, 2012 at 13:38
5
All Lisp developers seem to know what an S-Expression is. But can anybody explain this for non Lisp developers?
There is already a Wikipedia entry (https://en.wikipedia.org/wiki/S-expression). But ...
Glori asked 23/10, 2022 at 14:59
7
I was working in Emacs and then suddenly, the slime-repl sbcl says text is read only. Well that's great because now I can't type anything into it. How do I fix this?
3
Solved
In common lisp I can do this:
(mapcar #'cons '(1 2 3) '(a b c))
=> ((1 . A) (2 . B) (3 . C))
How do I do the same thing in elisp? When I try, I get an error:
(wrong-number-of-arguments map...
4
I want to insert a char into a list. However, I want to merge this char with the last symbol in the list. With appends and cons the result is always two different symbols. Well, I want one merged s...
Lustrous asked 29/3, 2013 at 19:25
8
Solved
I've heard that Lisp lets you redefine the language itself, and I have tried to research it, but there is no clear explanation anywhere. Does anyone have a simple example?
Efik asked 21/2, 2010 at 21:39
8
Solved
I am trying to learn lisp, using emacs dialect and I have a question.
let us say list has some members, for which predicate evaluates to false. how do I create a new list without those members? som...
3
Solved
I am trying to use unit-tests with Racket.
Usually, I am successful and I really like rackunit. However, I am having trouble with this specific case.
The function to be tested outputs two values....
Serinaserine asked 10/12, 2016 at 23:26
5
Solved
I'm wondering how to permanently alter the value of a global variable from inside a function, without using the variable's name inside the function, i.e.:
(defvar *test1* 5)
(defun inctest (x) (in...
Vaishnava asked 24/10, 2013 at 7:52
4
I'm trying to write a Common Lisp function that will give me all possible permutations of a list, using each element only once. For example, the list '(1 2 3) will give the output ((1 2 3) (1 3 2) ...
Triplicity asked 18/1, 2010 at 16:55
7
Solved
How can I get the command line arguments in (specifically in GNU, if there are any differences) Common Lisp?
Inkling asked 20/6, 2009 at 14:50
4
Solved
Assume there is a sample function defined in a library (this question's precondition is all definitions in this library cannot be modified, something like "read only"):
(defun sample ()
(foo)
(b...
11
Solved
I've been a web developer for some time now, and have recently started learning some functional programming. Like others, I've had some significant trouble applying many of these concepts to my pro...
Electroanalysis asked 1/12, 2008 at 9:28
5
Solved
I'm reaching back to my CLOS (Common Lisp Object System) days for this abstract question.
I'm augmenting the question to clarify:
It appears to me that a Python decorator is sort of like an "ar...
4
Solved
I have read chapter 4 of SICP, and just found that the first section lists the most important functions for implementing a evaluator, eval and apply, I understand that eval is very important, but w...
3
Every now and then, I accidentally hit C-x C-c in Emacs when I'm intending to just hit C-x or C-c. This, of course, closes all open frames and buffers with no confirmation. I know that I can make E...
8
Solved
How can i convert the string "1 2 3 4 5 6 7" into the list (1 2 3 4 5 6 7) elegantly? I am using CLISP.
Quarters asked 18/9, 2011 at 4:36
3
Solved
I have tried to understand the difference between Lisp-1 and Lisp-2 and how this relates to Clojure but I still do not understand properly. Can anyone enlighten me?
4
Solved
I'm writing my own mode in Elisp. It's basically a simple crud application showing rows of data which can be manipulated via the minibuffer. I'd like to create a view for these rows which looks lik...
3
Solved
I have a file that looks like this:
A B C D E
0 8 6 12 5
8 0 10 8 9
6 10 0 7 11
12 8 7 0 6
5 9 11 6 0
I don't know ahead of time how many rows and columns there will be. I would like to read the...
2
When I run the following codes in SBCL (2.3.5), I am surprised by how much bytes consed.
(defun number-of-digits (num)
(do ((n 1 (1+ n))
(num (floor num 10) (floor num 10)))
((zerop num) n)))
(...
Sheerlegs asked 24/7, 2023 at 4:57
5
Solved
In here, interpretation of Hello $world per each quoting symbol I mean language.
$world = "WΩrlδ"
"(Hell)*o $world\n" # <--- plain (Hell)*o, resolve $world, escape \n
'(Hell...
3
Solved
On MacOS: When I try to load log4cl I get a compile error:
CL-USER> (ql:quickload "log4cl")
To load "log4cl":
Load 1 ASDF system:
log4cl
; Loading "log4cl"
.
;
;...
Tinct asked 4/4, 2023 at 21:37
6
Solved
I was studying Lisp and I am not experienced in Lisp programming. In a part of my studies I encountered the below examples:
> (cons ‘a ‘(a b)) ----> (A A B)
> (cons ‘(a b) ‘a) ----> ((...
Internecine asked 17/4, 2015 at 15:32
4
Solved
I'm trying to figure out how to use the output stream of one program I start with RUN-PROGRAM so it can be used as the input of another program started with RUN-PROGRAM (i.e., the moral and perhaps...
Carpeting asked 1/3, 2010 at 1:6
1 Next >
© 2022 - 2024 — McMap. All rights reserved.