mylisp wasm demo
mylispの言語仕様ぽいもの
coding area
; FizzBuzz ; ------------------------------------------------------------------ (define fizzbuzz (lambda (n) (if (= 0 (rem n 15)) "FizzBuzz" (if (= 0 (rem n 5)) "Buzz" (if (= 0 (rem n 3)) "Fizz" n) )))) (define iter (lambda (start end) (if (<= start end) (cons start (iter (+ start 1) end)) nil))) (define map (lambda (f xs) (if (nil? xs) nil (cons (f (car xs)) (map f (cdr xs)))))) (define void (lambda (x) ())) (define print-fizzbuzz (lambda (start end) (void (map println (map fizzbuzz (iter start end)))))) (print-fizzbuzz 1 32)
RUN
result
output
error