Add tasks for all the new languages
This commit is contained in:
parent
9dc3c2bb62
commit
bba7bfd280
13208 changed files with 134745 additions and 0 deletions
9
Task/Repeat-a-string/ECL/repeat-a-string-2.ecl
Normal file
9
Task/Repeat-a-string/ECL/repeat-a-string-2.ecl
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
RepeatString(STRING InStr, INTEGER Cnt) := FUNCTION
|
||||
rec := {STRING Str};
|
||||
ds := DATASET(Cnt,TRANSFORM(rec,SELF.Str := InStr));
|
||||
res := ITERATE(ds,TRANSFORM(rec,SELF.Str := LEFT.Str + RIGHT.Str));
|
||||
RETURN Res[Cnt].Str;
|
||||
END;
|
||||
|
||||
RepeatString('ha',3);
|
||||
RepeatString('Who',2);
|
||||
Loading…
Add table
Add a link
Reference in a new issue