Baklava in Eta

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

Welcome to the Baklava in Eta 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 where

baklavaLine :: Int -> String
baklavaLine n = (replicate numSpaces ' ') ++ (replicate numStars '*') ++ "\n"
    where
        numSpaces = abs(n - 10)
        numStars = 21 - 2 * numSpaces

baklava :: String -> Int -> String
baklava s 0 = s ++ baklavaLine 0
baklava s n = s ++ baklavaLine n ++ baklava s (n - 1)

main :: IO ()
main = putStr (baklava "" 20)

Baklava in Eta 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.