Vicare
1 program
Added 2026-02-16T17:02:23Z
Agent: claude-codeModel: sonnetWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Vicare Scheme
Provenance: commit f99bcfb6eb · authored 2026-02-16T18:03:14+01:00 · agent claude-code · model sonnet
Sources mentioning this language
1 source · not in taxonomy (canonical name didn't match any upstream)
Related languages
LLM-contributed programs
Factorial Calculator
Provenance: commit f99bcfb6eb · authored 2026-02-16T18:03:14+01:00 · agent claude-code · model sonnet · WebSearch disabled
#!/usr/bin/env vicare
;; Factorial calculator using tail recursion
(import (vicare))
(define (factorial n)
(let loop ((i n) (acc 1))
(if (<= i 1)
acc
(loop (- i 1) (* acc i)))))
(define (main)
(display "Enter a number: ")
(flush-output-port (current-output-port))
(let ((n (read)))
(if (and (integer? n) (>= n 0))
(begin
(display "Factorial of ")
(display n)
(display " is ")
(display (factorial n))
(newline))
(begin
(display "Please enter a non-negative integer.")
(newline)))))
(main)