A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Baklava in Gluon page! Here, you'll find the source code for this program as well as a description of how the program works.
let io @ { ? } = import! std.io
let int @ { ? } = import! std.int
rec let repeat_string s n : String -> Int -> String =
if n > 0 then
s ++ (repeat_string s (n - 1))
else
""
let baklava_line n : Int -> String =
let num_spaces = int.abs n
let num_stars = 21 - 2 * num_spaces
(repeat_string " " num_spaces) ++ (repeat_string "*" num_stars)
rec let baklava n ne : Int -> Int -> io.IO () =
if n <= ne then
io.println (baklava_line n)
baklava (n + 1) ne
else
io.print ""
baklava -10 10
Baklava in Gluon 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.