fork(1) download
  1. ; happy new year
  2.  
  3. (define (tri-list n)
  4. (let loop ((i 0) (ts (list 0)))
  5. (if (= n i) (reverse ts)
  6. (loop (+ i 1) (cons (+ i (car ts) 1) ts)))))
  7.  
  8. (display (tri-list 63)) (newline)
  9.  
  10. (define (tri n) (* n (+ n 1) 1/2))
  11.  
  12. (display (tri 63)) (newline)
Success #stdin #stdout 0.03s 8616KB
stdin
Standard input is empty
stdout
(0 1 3 6 10 15 21 28 36 45 55 66 78 91 105 120 136 153 171 190 210 231 253 276 300 325 351 378 406 435 465 496 528 561 595 630 666 703 741 780 820 861 903 946 990 1035 1081 1128 1176 1225 1275 1326 1378 1431 1485 1540 1596 1653 1711 1770 1830 1891 1953 2016)
2016