Baklava in Pony

Published on 21 December 2024 (Updated: 21 December 2024)

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

Current Solution

actor Main
  new create(env: Env) =>
    var n: I32 = -10
    while n <= 10 do
      let numSpaces: I32 = if n >= 0 then n else -n end
      let numStars: I32 = 21 - (2 * numSpaces)
      env.out.print(repeatString(" ", numSpaces) + repeatString("*", numStars))
      n = n + 1
    end

  fun repeatString(s: String, n: I32): String =>
    var result = ""
    var i: I32 = 0
    while i < n do
      result = result + s
      i = i + 1
    end
    result

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