Baklava in Ferret

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

Welcome to the Baklava in Ferret page! Here, you'll find the source code for this program as well as a description of how the program works.

Current Solution

(defn print-repeat-string
  ([s n]
    (if (> n 0)
      (do
        (print s)
        (print-repeat-string s (dec n))
      )
    )
  )
)

(defn baklava-line
  ([n]
    (let [
      num-spaces (abs n)
      num-stars (- 21 (* 2 num-spaces))
    ]
      (print-repeat-string " " num-spaces)
      (print-repeat-string "*" num-stars)
      (println)
    )
  )
)

(defn baklava
  ([n ne]
    (if (<= n ne)
      (do
        (baklava-line n)
        (baklava (inc n) ne)
      )
    )
  )
)

(do
  (baklava -10 10)
)

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