We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.
Disan
Jump to navigation
Jump to search
Its only command, D, implements the Disan Count.
Examples
Implement the Disan Count
D
Interpreter
The following implementation is realized in Common Lisp:
(defun interpret-Disan (code)
"Interprets the piece of Disan CODE and returns NIL."
(declare (type string code))
(loop for token of-type character across code do
(if (char= token #\D)
(let ((n (parse-integer (read-line))))
(declare (type integer n))
(let ((a 0))
(declare (type integer a))
(loop while (< a n) do
(when (evenp a)
(format T "~&~d is even!" a))
(incf a 1))))
(error "Invalid character: \"~c\"." token))))