Skip to main content
We’ve updated our Terms of Service. A new AI Addendum clarifies how Stack Overflow utilizes AI interactions.
Code Golf

Return to Answer

Commonmark migration
Source Link

#Clojure, 81 bytes

Clojure, 81 bytes

#(doseq[[c d](map vector %(cycle[100 100 500]))](Thread/sleep d)(print c)(flush))

Loops over the input string zipped with a infinite list of [100 100 500].

(defn typer [input]
 ; (map vector... is generally how you zip lists in Clojure 
 (doseq [[chr delay] (map vector input (cycle [100 100 500]))]
 (Thread/sleep delay)
 (print chr) (flush)))

#Clojure, 81 bytes

#(doseq[[c d](map vector %(cycle[100 100 500]))](Thread/sleep d)(print c)(flush))

Loops over the input string zipped with a infinite list of [100 100 500].

(defn typer [input]
 ; (map vector... is generally how you zip lists in Clojure 
 (doseq [[chr delay] (map vector input (cycle [100 100 500]))]
 (Thread/sleep delay)
 (print chr) (flush)))

Clojure, 81 bytes

#(doseq[[c d](map vector %(cycle[100 100 500]))](Thread/sleep d)(print c)(flush))

Loops over the input string zipped with a infinite list of [100 100 500].

(defn typer [input]
 ; (map vector... is generally how you zip lists in Clojure 
 (doseq [[chr delay] (map vector input (cycle [100 100 500]))]
 (Thread/sleep delay)
 (print chr) (flush)))
Source Link
Carcigenicate
  • 3.6k
  • 2
  • 23
  • 31

#Clojure, 81 bytes

#(doseq[[c d](map vector %(cycle[100 100 500]))](Thread/sleep d)(print c)(flush))

Loops over the input string zipped with a infinite list of [100 100 500].

(defn typer [input]
 ; (map vector... is generally how you zip lists in Clojure 
 (doseq [[chr delay] (map vector input (cycle [100 100 500]))]
 (Thread/sleep delay)
 (print chr) (flush)))

AltStyle によって変換されたページ (->オリジナル) /