Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
11
Task/Rep-string/PicoLisp/rep-string-1.l
Normal file
11
Task/Rep-string/PicoLisp/rep-string-1.l
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(de repString (Str)
|
||||
(let Lst (chop Str)
|
||||
(for (N (/ (length Lst) 2) (gt0 N) (dec N))
|
||||
(T
|
||||
(use (Lst X)
|
||||
(let H (cut N 'Lst)
|
||||
(loop
|
||||
(setq X (cut N 'Lst))
|
||||
(NIL (head X H))
|
||||
(NIL Lst T) ) ) )
|
||||
N ) ) ) )
|
||||
12
Task/Rep-string/PicoLisp/rep-string-2.l
Normal file
12
Task/Rep-string/PicoLisp/rep-string-2.l
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
(test 5 (repString "1001110011"))
|
||||
(test 4 (repString "1110111011"))
|
||||
(test 3 (repString "0010010010"))
|
||||
(test 4 (repString "1010101010"))
|
||||
(test 5 (repString "1111111111"))
|
||||
(test NIL (repString "0100101101"))
|
||||
(test 3 (repString "0100100"))
|
||||
(test NIL (repString "101"))
|
||||
(test 1 (repString "11"))
|
||||
(test 1 (repString "00"))
|
||||
(test NIL (repString "1"))
|
||||
(test NIL (repString "0100101"))
|
||||
Loading…
Add table
Add a link
Reference in a new issue