(newbie?) Question about map car and funcall1439 (10/14/2012 1:38:10 PM) Hi, I have a list of functions in Common Lisp, say (1+ 1-), and apply them to a list of arguments, say (2 5), to obtain (3 4).
(mapcar #'funcall '(1+ 1-) '(2 5)) does the trick, but, if I try to substitute 1... luke.anto(2)
Never trust a LOOP131 (3/17/2012 1:20:51 PM) Russell Senior wrote: > >>>>> "Tim" == Tim Bradshaw writes: > > Tim> I think if you're going to use loop then you should go the whole > Tim> horrid way: > > Tim> (defun avg (args) (loo... w_a_x_man(2778)
Re: Where you can you go with Lisp?214 (3/17/2012 11:55:31 AM) > BTW, here's a solution to one of the C++ problems you asked about, in > Common Lisp: > > (defun f () > (format t "Number of rooms ") > (let* ((rooms (loop for i from 1 to (read) > ... w_a_x_man(2778)
Re: Hash to list?115 (3/15/2012 12:48:55 PM) Hannu Koivisto wrote: > Ola Rinta-Koski writes: > > | Is there an easier way to convert a hash table into a list than > > Values of a hash table, based on your exam... w_a_x_man(2778)
How to store computer-generated data?634 (10/14/2012 10:37:36 AM) How can I store a computer-generated function or data in a file without having to write source code and without loading dependencies?
For instance, imagine the program has generated the equivalent to the fol... floriandietz44(33)
The new functional programming concept...1048 (9/12/2012 4:07:10 PM) From the current issue of the Java Developer Newsletter, received today:
Best-Kept Secrets Surrounding Java 8
Did you know that the schedule for upcoming features in JDK 8 are
available now o... alb1(31)
Abusive vs Annoying357 (10/18/2012 3:59:03 PM) There are posts on this group that are beyond annoying. I will not mention names or initials.
But they are not abusive. Please don't label annoying posts as abusive on Google groups. Just ignore them, a... mirko.vukovic(404)
re: Advice for a new lisper122 (5/26/2012 3:22:17 PM) Kenny Tilton wrote:
> > (defun straightp (hand)
> > (if (null (cdr hand))
> > t
> > (and (= (caar hand) (- (caadr hand) 1)) (straightp (cdr hand)))))
> Not bad, except of course... w_a_x_man(2778)
from list to hash table841 (7/28/2012 6:42:27 AM) Can this be done with less calls to gethash/sethash?
(let ((h (make-hash-table :size (length lst))))
(dolist (el lst)
(if (gethash el h)
(incf (gethash el h))
(setf (gethash el h) 0)))