3 ms·
You can also do that in Clojure, since you'd usually self-recurse with (recur) and a function will create a recursion point. (set-timeout (fn [] (if
by masklinn 13y ago
You can also do that in Clojure, since you'd usually self-recurse with (recur) and a function will create a recursion point.
(set-timeout (fn []
(if (should-recurse)
(recur)))
- Morgawr 13y agoYou can also name fns in clojure (map (fn whatever [a] (println a)) [1 2 3]) ps: this code is stupid but I'm too lazy to write useful clojure from my phone, you get the gist
- draegtun 13y agoAnd you can also do that in Perl: set_timeout sub { __SUB__->() if should_recurse(); }; NB. __SUB__ was added at Perl 5.16 and so requires either: use 5.016; # or newer use feature 'current_sub';