(define (collatz n) (displayln n) (if (<= n 1) 1 (if (even? n) (collatz (/ n 2)) (collatz (add1 (* 3 n))))))'Programming' 카테고리의 다른 글
| (Julia) Zero-based indexing ... (not) again (0) | 2024.01.29 |
|---|---|
| (Julia) 매크로 (0) | 2024.01.26 |
| 백만 이하로 시작하는 우박수 중 가장 긴 과정을 거치는 것은? (0) | 2024.01.09 |
| Common Lisp's BLOCK / RETURN-FROM and UNWIND-PROTECT (0) | 2024.01.09 |
| (Racket) 그래프 그리기 (plot) (0) | 2023.12.19 |