summaryrefslogtreecommitdiff
path: root/day2/repeats.TXT
diff options
context:
space:
mode:
Diffstat (limited to 'day2/repeats.TXT')
-rw-r--r--day2/repeats.TXT24
1 files changed, 24 insertions, 0 deletions
diff --git a/day2/repeats.TXT b/day2/repeats.TXT
new file mode 100644
index 0000000..89bc52c
--- /dev/null
+++ b/day2/repeats.TXT
@@ -0,0 +1,24 @@
+\START92\
+\COMMENT=Single file dated Thu Dec 4 00:10:23 20
+\NAME=repeats
+\FILE=day2.repeats.92f
+(s,i)
+Func
+Local j,t
+If i=1 Then
+ Return s
+ElseIf i=2 Then
+ Return s&s
+ElseIf i=3 Then
+ Return s&s&s
+ElseIf mod(i,2)=1 Then
+ floor(i/2)\->\j
+ repeats(s,j)\->\t
+ Return t&t&s
+EndIf
+repeats(s,i/2)\->\t
+Return t&t
+
+EndFunc
+
+\STOP92\