Gå til innhold

"Ctrl+v"-tråden - hva ligger på klippbordet ditt?


Anbefalte innlegg

Videoannonse
Annonse
(defun show-xor (a b)

  (format t "~B xor ~B => ~B" a b (logxor a b)))

 

 

(defun has-list (l)

  (if (null (car l))

      nil

      (if (listp (car l))

          t

          (has-list (cdr l)))))

 

 

(defun has-list2 (l)

  (dolist (e l)

    (when (listp e)

      (return-from has-list2 t)))

  nil)

 

 

(defun print-dots-recursive (x)

  (if (!= 0 x)

      (return-from print-dots-recursive)

      (progn

        (format t ".")

        (print-dots-recursive (- x 1)))))

 

 

(defun print-dots-iterative (x)

  (do ((i x (- i 1)))

      ((< i 1))

    (format t ".")))

 

 

(defun recursion1 (x)

  (if (> x 0)

      (progn

        (format t "x = ~A~%" x)

        (recursion1 (- x 1)))

      nil))

   

       

(defun num-a-recursive (l)

  (if (null l)

      0

      (if (eql (car l) 'a)

          (+ (num-a-recursive (cdr l)) 1)

          (num-a-recursive (cdr l)))))

 

Masse matnyttig her på Søpple-forumet ... :]

Endret av søppel
Lenke til kommentar

nown as nexii\a

* O_Racing has joined #Levanger

<Vamp`> hehe

<Vamp`> sure

<Vamp`> :p

* MadaxX has joined #Levanger

* Tho\ is now known as Tho\a

* ^DeMoN^ has quit IRC (Lost terminal)

* ^juliette has joined #Levanger

<Shade^^> *will be ready to bli eid*

* Looking up ^juliette user info...

<dvX-_-> Bra engelsk :p

<meja^_-> høhø

* Zelsux has joined #Levanger

* E|vir[A] has quit IRC (>",<)

<Shade^^> blanding :p

* Hasse^ has joined #Levanger

* mizzy_ has joined #levanger

<Shade^^> *will be ready to get owned* elns? :p

* |Kristine has left #Levanger

* MIW-_^ is now known as miw[AW]

* ^DeMoN^ has joined #Levanger

<Shade^^> www.pwned.nl <-- haha :p morsom cs film

<Shade^^> ^DeMoN^ :D

* Mart|n3- has quit IRC

<^DeMoN^> Shade^^ :p

* Nuppe|aw is now known as Nuppe

Lenke til kommentar
Gjest
Dette emnet er stengt for flere svar.
  • Hvem er aktive   0 medlemmer

    • Ingen innloggede medlemmer aktive
×
×
  • Opprett ny...