Baklava in Scheme

Published on 28 October 2024 (Updated: 28 October 2024)

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

Current Solution

(define (string-repeat n str)
  (fold string-append "" (make-list n str))
)

(define (baklava-line i)
  (define numSpaces (abs i))
  (define numStars (- 21 (* 2 numSpaces)))
  (when (<= i 10)
    (display (string-repeat numSpaces " "))
    (display (string-repeat numStars "*"))
    (newline)
    (baklava-line (+ i 1))
  )
)

(baklava-line -10)

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