Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Damn it /prog/

Name: Anonymous 2009-07-27 14:50

I wrote some actual programmes when you were down. Please don't leave me again.

Name: Anonymous 2009-07-27 19:37

>>12
That's more like what I was thinking of, but I'd been coding non-functionally all week.
Of course, there were a few errors

(define (takeh n xs)
  (if (or (null? xs) (<= n 0)) '()
    (cons (car xs) (takeh (- n 1) (cdr xs)))))

(define (droph n xs)
  (if (or (null? xs) (<= n 0)) xs
    (droph (- n 1) (cdr xs))))

(define (split-at n xs)
  (list (takeh n xs) (droph n xs)));This is me just being nitpicky though cons is fine

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List