Baklava in Discus

Published on 14 January 2025 (Updated: 14 January 2025)

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.

Current Solution

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.

How to Implement the Solution

No 'How to Implement the Solution' section available. Please consider contributing.

How to Run the Solution

No 'How to Run the Solution' section available. Please consider contributing.