Baklava in Kitten

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

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

Current Solution

define repeat_string (List<Char>, Int32 -> List<Char>):
    -> s, n;
    if (n > 0) {
        s s n 1 (-) repeat_string (+)
    } else {
        ""
    }

define baklava_line (Int32 -> List<Char>):
    -> n;
    n abs -> num_spaces;
    21 2 num_spaces (*) (-) -> num_stars;
    " " num_spaces repeat_string
    "*" num_stars repeat_string (+)

define baklava (Int32, Int32 -> +IO):
    -> n, ne;
    if (n <= ne) {
        n baklava_line say
        n 1 (+) ne baklava
    }

-10 10 baklava

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