Re: newbie question



"dvlfrnd" <iresjen@xxxxxxxxx> wrote in message
news:1136059463.523048.214540@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

> but couldn't find a way to apply it to the entire list.
> i tried a recursive function,but it didnt give the output i wanted.

Here is a recursive solution to add to the loops:

(defun divide-in-pairs (list)
(cond ((not (listp list)) (error "non-list argument"))
((null list) nil)
((null (cdr list)) (error "odd number of elements"))
((null (cddr list)) (list list))
(t (cons (list (first list) (second list))
(divide-in-pairs (cddr list))))))

--
Coby Beck
(remove #\Space "coby 101 @ bigpond . com")


.



Relevant Pages

  • Re: Movie Facts:
    ... SORRY and i apologize for the copy .I really didnt mean any offence .I ... When you first said i thought it was a point from the post Movie Facts ... Prev by Date: ...
    (alt.fan.starwars)
  • Re: I have treeview node_click routine that is doing something that I dont get.
    ... I didnt really have a use for a Form_Current event, but I did go back and ... that code wouldnt run after the bookmark changed would it? ... Alex Dybenko wrote: ... Prev by Date: ...
    (microsoft.public.access.modulesdaovba)
  • Re: unable to login to server
    ... Oh well good thing it was sorted, didnt think of that:) ... > Hi Rene ... >> 'Remote desktop Users'. ... Prev by Date: ...
    (microsoft.public.windows.terminal_services)
  • Re: USELESS Kaif
    ... look confident at all. ... Nomen Nescio wrote: ... Prev by Date: ...
    (rec.sport.cricket)
  • Re: Blue Badges abuse.
    ... Hello Peter my friend ... It didnt take you long to get back to your readfreenews account did it? ... Prev by Date: ...
    (uk.people.disability)