RosettaCodeData/Task/Rep-string/LFE/rep-string-1.lfe
2016-12-05 23:44:36 +01:00

13 lines
294 B
Text

(defun get-reps (text)
(lists:filtermap
(lambda (x)
(case (get-rep text (lists:split x text))
('() 'false)
(x `#(true ,x))))
(lists:seq 1 (div (length text) 2))))
(defun get-rep
((text `#(,head ,tail))
(case (string:str text tail)
(1 head)
(_ '()))))