From 3e3bff8480a04277e608f80a407c6d1f2d7019a4 Mon Sep 17 00:00:00 2001 From: Kiril Date: Mon, 4 Nov 2024 15:08:32 +0200 Subject: [PATCH 1/3] Create reee.erl --- reee.erl | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 reee.erl diff --git a/reee.erl b/reee.erl new file mode 100644 index 0000000..fc8d517 --- /dev/null +++ b/reee.erl @@ -0,0 +1,10 @@ +-module(main). +-export([main/1]). + +main(_) -> + io:format("r~n", []), + repeat(). + +repeat() -> + io:format("e~n", []), + repeat(). From b5fb30ca0143d02dcc09c30ace1d06c0652b1de7 Mon Sep 17 00:00:00 2001 From: Kiril Date: Mon, 4 Nov 2024 15:08:54 +0200 Subject: [PATCH 2/3] Create reee.psc --- reee.psc | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100644 reee.psc diff --git a/reee.psc b/reee.psc new file mode 100644 index 0000000..7c018cc --- /dev/null +++ b/reee.psc @@ -0,0 +1,10 @@ +Scriptname PrintReee extends Quest + +Function StartPrinting() + Debug.Notification("r") + int count = 0 + while count < 32 + Debug.Notification("e") + count += 1 + endWhile +EndFunction From db98f2bb5e5782981f2d5b14f67a4f1c70e0b2bb Mon Sep 17 00:00:00 2001 From: Kiril Date: Mon, 4 Nov 2024 15:09:14 +0200 Subject: [PATCH 3/3] Create reee.purs --- reee.purs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 reee.purs diff --git a/reee.purs b/reee.purs new file mode 100644 index 0000000..9005ab1 --- /dev/null +++ b/reee.purs @@ -0,0 +1,20 @@ +module Main where + +import Prelude +import Data.Foldable (fold) +import Effect (Effect) +import TryPureScript (p, text, render) + +main :: Effect Unit +main = + render $ fold + [ + p (text (generateEs 1000)) + ] + +generateEs :: Int -> String +generateEs n = "r" <> repeatChar n "e" + +repeatChar :: Int -> String -> String +repeatChar 0 _ = "" +repeatChar n ch = ch <> repeatChar (n - 1) ch