Data update
This commit is contained in:
parent
ed705008a8
commit
0df55f9f24
2196 changed files with 32999 additions and 3075 deletions
34
Task/Rep-string/Refal/rep-string.refal
Normal file
34
Task/Rep-string/Refal/rep-string.refal
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
$ENTRY Go {
|
||||
, ('1001110011') ('1110111011') ('0010010010')
|
||||
('1010101010') ('1111111111') ('0100101101')
|
||||
('0100100') ('101') ('11') ('00') ('1'): e.Tests
|
||||
= <Each Show e.Tests>;
|
||||
};
|
||||
|
||||
Each {
|
||||
s.F = ;
|
||||
s.F t.I e.R = <Mu s.F t.I> <Each s.F e.R>;
|
||||
};
|
||||
|
||||
Show {
|
||||
(e.S), <RepString e.S>: e.R = <Prout e.S ' => ' e.R>;
|
||||
};
|
||||
|
||||
RepString {
|
||||
() e.S = ;
|
||||
(e.R) e.S, <Lengthen (e.R) e.S>: e.S e.X = e.R;
|
||||
(e.R s.C) e.S = <RepString (e.R) e.S>;
|
||||
e.S, <Lenw e.S>: s.L e.S,
|
||||
<First <Div s.L 2> e.S>: (e.F) e.X
|
||||
= <RepString (e.F) e.S>;
|
||||
};
|
||||
|
||||
Lengthen {
|
||||
(e.A) e.B, <Lenw e.A>: s.LA e.A,
|
||||
<Lenw e.B>: s.LB e.B,
|
||||
<Compare s.LA s.LB>: '-'
|
||||
= <Lengthen (e.A e.A) e.B>;
|
||||
(e.A) e.B, <Lenw e.B>: s.LB e.B,
|
||||
<First s.LB e.A>: (e.FA) e.RA
|
||||
= e.FA;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue