Data dodania Pytanie
2017-04-21 18:04 Clisp can't find package »
I have been running a lisp program with allegro common lisp for a couple of days. I need to use clisp now but when I try to compile it I get: SYSTEM:...
(1) odpowiedzi
2017-04-17 13:04 Store list from file input stream, in a variable in LISP »
I have lets say the following list in a .txt file (5 3 1) All i am trying with following source code is to store the above list in a variable in LI...
(1) odpowiedzi
2017-04-16 15:04 Concatenate List of Characters Recursively in Common LISP »
So I'm attempting to implement a Caesar cipher in LISP recursively, and I've got the basic functionality working. The problem is it returns a list of ...
(2) odpowiedzi
2017-04-14 14:04 Write a function that takes a number as its argument and construct a list »
I start learning LISP, and I have a question need your help. Write a function NEW-LIST that takes a number as its argument and constructs a list o...
(1) odpowiedzi
2017-04-13 11:04 Whats 'T' at the end in SBCL »
I am new at SBCL programming and I ran a simple Addition program: (defvar a) (defvar b) (defvar c) (defvar d) (write-line "Enter ...
(1) odpowiedzi
2017-04-12 22:04 Lisp - Logical operators »
I am new to Lisp so this might be so simple but I am curious to know about this in any case. I am familiar with logical operators like AND and OR but...
(2) odpowiedzi
2017-04-11 00:04 How to store lispbuilder-sdl:colors in a list? »
I trying to store two colors in list: (defparameter *colist* '(sdl:*black* sdl:*red*)) Printing sdl:color will return color in sbcl console (print...
(1) odpowiedzi
2017-04-10 15:04 How can I get the range between the smallest number and the second smallest number in Common Lisp? »
I am making a function which represents the largest number and the range between the smallest number and the second smallest number in Common Lisp. T...
(3) odpowiedzi
2017-04-07 18:04 How can I write a MEMBER function using the DO macro in Common Lisp? »
I am trying to make a function which works like MEMBER function in Common Lisp. So, I want to make this function work like this : (my-member 2 '(1 4 ...
(1) odpowiedzi
2017-04-07 07:04 Step Eval Common Lisp »
I have been trying to find a method to do a "step" eval. Where I call the a function and it evaluates the most nested list for common lisp. For examp...
(2) odpowiedzi
2017-04-06 20:04 Converting misspelled text to integer in Common Lisp? »
I am totally new to Common Lisp and Lisp in general. I have a task to write using Common Lisp and can't even figure out how to begin. My program will ...
(1) odpowiedzi
2017-04-04 16:04 Option type encoding / robustness in Lisp »
(define (nth n lst) (if (= n 1) (car lst) (nth (- n 1) (cdr lst) ))) is an unsafe partial function, n may go out of range. An err...
(4) odpowiedzi
2017-03-31 21:03 Lisp: How to obtain the final loop value? »
(defun index-iteration (n) (let ((x 0)) (loop for j from 0 to n while (< x n) do (setf x (max-index-for-iteration j))))) I have the ...
(2) odpowiedzi
2017-03-29 21:03 How to print the elements in odd positions in a list using an iterative function in Lisp? »
I have to make a recursive function in lisp which takes a list and makes another list with only the elements on odd position in the given list. If I ...
(2) odpowiedzi
2017-03-29 04:03 Check for ascending order of a list in Racket »
I'm new to racket and trying to write a function that checks if a list is in strictly ascending order. '( 1 2 3) would return true '(1 1 2) would r...
(4) odpowiedzi
2017-03-28 19:03 Can implicit conversion by Lisp's FORMAT function be controlled? »
While trying to round a fraction to 9 digits, I came across the following: ? (format t "~9$" 763700091/112000148) 6.818742300 Nil But the rounding ...
(2) odpowiedzi
2017-03-28 14:03 Unbound variable error when using defmacro in LISP »
I am trying to use macro with two forms in LISP, which evaluates both forms but always return the result of form 2. Below is the code that I am using ...
(2) odpowiedzi
2017-03-27 23:03 Where is the implementation of values-list in SBCL? »
I am trying to figure out the implementation of values-list function in SBCL. The source code at src/code/eval.lisp looks like pretty simple, but why ...
(1) odpowiedzi
2017-03-27 20:03 How do I read a text file in LISP? »
I have a .txt file like this: 0 1 2 3 4 5 6 7 8 0 1 2 3 4 5 6 7 8 And i want LISP to read the text file and generate two lists, the first one with...
(1) odpowiedzi
2017-03-22 00:03 Optimisation options sbcl »
How to set optimization options like "speed 3" for all functions? (declaim (optimize (speed 3) (debug 0) (safety 0)) Doesnt work( ...
(1) odpowiedzi
2017-03-20 23:03 Common Lisp equivalent to Racket's "module languages" »
I would like to create a DSL (domain-specific language) with a set of Common Lisp macros, and restrict parsing of the files written in the DSL. I have...
(1) odpowiedzi
2017-03-20 06:03 Lisp recursion for split-list »
(defun split-list (L) (if (endp L) '(nil nil) (let ((x (split-list (cdr L)))) (list (cons (car L) (cadr x))(car X)) ...
(1) odpowiedzi
2017-03-19 14:03 Common Lisp EVAL Function Quotations »
My question is rather simple (perhaps misleadingly so). In Common Lisp, when I run the following command, I get the corresponding results: (eval '''...
(3) odpowiedzi
2017-03-12 23:03 Creating 2 files and writing to them different content from another file in Lisp »
I am trying to write in 2 different files content from another file. Procedure is that I have to write 10 lines of file_a in one file and the rest in ...
(1) odpowiedzi
2017-03-12 20:03 Is there a way to make a button in a Racket web application call a function defined within the file? »
I would like to know if it's possible to create a button that calls a function such as (define example (print "Hello")) when a user clicks a button - ...
(1) odpowiedzi
2017-03-10 15:03 Is it possible to limit the number of calls to the cons function in the duplicate() function? »
I wrote the function double() that duplicate the items in a list as follows: (defun duplicate (l) (if (null l) nil (cons (car l) (cons ...
(3) odpowiedzi
2017-03-07 13:03 lisp Cons cell diagram for the list »
This is my trying code. (defun f (lst) (cond ((null lst) nil) ((listp (first lst)) nil (f (car lst))) (t (cons (f...
(1) odpowiedzi
2017-03-07 07:03 LISP programming »
(defun bubbleUp (n) (cond ((null n) nil) ((null (cdr n)) n) ((> (car n) (car (cdr n))) (append (list (car (cdr n))) ...
(1) odpowiedzi
2017-03-06 16:03 lisp swap list elements »
This is my lisp code. (defun f (lst) (append (subst (last lst) (first lst) (car lst)) (subst (first lst) (last lst) (...
(2) odpowiedzi
2017-03-05 04:03 How can the symbols in a Pandoric Macro be compiled out? »
I have read section 6.7 of LOL a few times now, and I still can't wrap my mind around the following. Bindings that were previously closed to outsi...
(2) odpowiedzi
2017-03-03 15:03 &optional parameter in lisp macros: Why does this variable behave like this? »
I'm trying to create a lisp macro that has an &optional parameter with a default value. Unfortunately the parameter is processed differently depen...
(1) odpowiedzi
2017-02-26 20:02 How do you detect key presses on a Racket web application? »
I've been through the documentation for web-servers and can't find anything on it. Here's my code for a basic web application: #lang racket (requir...
(1) odpowiedzi
2017-02-26 17:02 How is the defun macro implemented in lisp? »
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...
(2) odpowiedzi
2017-02-26 09:02 Lisp- "[Function name] Is not a Number" »
So I have this simple expression to evaluate and list the two roots of a quadratic equation: (defun QUADRATIC (A B C) (list (/ (+ (- B) (sqrt(- (*...
(1) odpowiedzi
2017-02-24 03:02 Passing by parameters by value in lisp »
The problem I am having is that I can't get around the fact that lisp passes arrays by value not by reference. When I researched this problem, the so...
(1) odpowiedzi