Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Created reee.Purs reee.psc and reee.erl #172

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions reee.erl
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
-module(main).
-export([main/1]).

main(_) ->
io:format("r~n", []),
repeat().

repeat() ->
io:format("e~n", []),
repeat().
10 changes: 10 additions & 0 deletions reee.psc
Original file line number Diff line number Diff line change
@@ -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
20 changes: 20 additions & 0 deletions reee.purs
Original file line number Diff line number Diff line change
@@ -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