A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Baklava in Arkscript page! Here, you'll find the source code for this program as well as a description of how the program works.
(import std.List)
(import std.Math)
(import std.Range)
(import std.String)
(let repeat_string
(fun (n s)
(string:join (list:fill n s) "")
)
)
(let baklava_line
(fun (n) {
(let num_spaces (math:abs n))
(let num_stars (- 21 (* 2 num_spaces)))
(string:join [(repeat_string num_spaces " ") (repeat_string num_stars "*")] "")
})
)
(let ctr (range:range -10 11))
(range:forEach
ctr
(fun (n)
(print (baklava_line n))
)
)
Baklava in Arkscript was written by:
If you see anything you'd like to change or update, please consider contributing.
No 'How to Implement the Solution' section available. Please consider contributing.
No 'How to Run the Solution' section available. Please consider contributing.