Add tasks for all the new languages

This commit is contained in:
Tina Müller 2016-12-05 23:44:36 +01:00
parent 9dc3c2bb62
commit bba7bfd280
13208 changed files with 134745 additions and 0 deletions

View file

@ -0,0 +1,13 @@
(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)
(_ '()))))

View file

@ -0,0 +1,10 @@
(defun report
((`#(,text ()))
(io:format "~p has no repeating characters.~n" `(,text)))
((`#(,text (,head . ,_)))
(io:format "~p repeats ~p every ~p character(s).~n" `(,text ,head ,(length head))))
((data)
(lists:map
#'report/1
(lists:zip data (lists:map #'get-reps/1 data)))
'ok))