ArkDoc is a documentation generator for ArkScript, based on comments.
# @brief Iterate over a given list and run a given function on every element.
# @param _L the list to iterate over
# @param _func the function to call on each element
# @details The original list is left unmodified.
# @deprecated This function is deprecated because I felt like it
# @changed 1.0.0 `forEach` is now a function instead of a macro
# @changed 2.0.0 `forEach` does not modify the list
# =begin
# (import std.List)
# (let collection [1 2 5 12])
# (list:forEach collection (fun (element)
# (print element)))
# =end
# @author https://github.com/SuperFola
(let list:forEach (fun (_L _func) {
(mut _index 0)
(while (< _index (len _L)) {
(mut _element (@ _L _index))
(_func _element)
(set _index (+ 1 _index)) })}))
ArkDoc is a Python 3.9 module.