Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
Common Lisp, or ANSI Common Lisp, is a standardized version of the Lisp programming language intended for production-strength power and libraries.
2
votes
Find minimum value in a BST: using boolean operators, and using conditionals
Can you process code like that in a single glance? That's my really my
point.
Yes, and it is in fact a way of expressing code that I miss in other languages, where the equivalent code feels nee …
1
vote
Accepted
Generating a list (or a string) with random elements
Note that Alexandria defines random-elt (and whichever).
My only complain is that random-element does too much, both digits and characters.
This would be the kind of use cases where I would rely on g …
3
votes
Accepted
Calculating the cube root
There is not much to say about this code, it is fine.
You can get rid of incf and setf; the varying x is replaced by a variable named z; I express the comparison as a boolean variable greater (for la …
4
votes
pos+ (value added to position) - ex 3.5 in “ANSI Common Lisp” (p57)
General style remarks
lst is more of a Scheme idiom, in Common Lisp you don't eat vowels but write directly list if your variable is a list (to be honest, some CL standard functions have weird names …
3
votes
Golden Section Search in Lisp
The Common Lisp standard does not require implementations to eliminate tail calls, but this is an optimization supported by many implementations. It is the case for Lispworks. You can write your code …
1
vote
Generic sequence splitter in Common Lisp
Your code works but has some efficieny problems, as already pointed out by Rainer Joswig ("it conses like mad"). Now that you posted a modified version I added some details at the end of the answer.
…
0
votes
Calculate the weekday from a date (M-D-Y)
Split
Here is an alternative implementation of split using the loop facility.
(defun split (split-char string-to-split)
(loop for start = 0 then (1+ end)
for end = (position split-char str …
3
votes
Did I convert this C++ class to Common Lisp correctly?
Code review - mostly style
You did a litteral translation from C++ to CL that seems good. I have some stylistic issues with it:
(defclass training-data ()
((training-data-stream :reader training-d …