[ create a new paste ] login | about

pbewig

Name:
Email:
Site/Blog:
Location:
Default language: Scheme
Favorite languages:
About:

Saved pastes by pbewig:

Scheme, pasted on Jun 28:
1
2
3
4
5
; world cup prognostication

(define sort #f)
(define merge #f)
(let ()
...
view (121 lines, 1 line of output)
Scheme, pasted on Feb 24:
1
2
3
4
5
; Mardi Gras

; Easter occurs each year on the first Sunday after the first full moon after
; the vernal equinox.  Mardi Gras occurs on the Tuesday of the seventh week
; before Easter.  This program calculates the date of Mardi Gras.
...
view (82 lines, 1 line of output)
Scheme, pasted on Jan 23:
1
2
3
4
5
(define (primes n)
  (let* ((max-index (quotient (- n 3) 2)) (v (make-vector (+ 1 max-index) #t)))
    (let loop ((i 0) (ps '(2)))
      (let ((p (+ i i 3)) (startj (+ (* 2 i i) (* 6 i) 3)))
        (cond ((>= (* p p) n)
...
view (17 lines, 1 line of output, 1 comment)