A Collection of Code Snippets in as Many Programming Languages as Possible
This project is maintained by TheRenegadeCoder
Welcome to the Baklava in Discus page! Here, you'll find the source code for this program as well as a description of how the program works.
module Main
import System.IO.Console
import Data.List
import Data.Text.List
where
baklavaLine (n: Nat): Text
= (textOfCharList (replicate num_spaces ' ')) % (textOfCharList (replicate num_stars '*'))
where
num_spaces = if n > 10 then n - 10 else 10 -n
num_stars = 21 - 2 * num_spaces
main ()
= forS (enumFromTo 0 20) $ λn
-> writel $ baklavaLine n
Baklava in Discus 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.