Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
25 lines (16 sloc) 508 Bytes
module Y2018.M02.D20.Exercise where
{--
From our favorite Prolog problem archive, P99:
http://www.ic.unicamp.br/~meidanis/courses/mc336/2009s2/prolog/problemas/
P14 (*) Duplicate the elements of a list.
Example:
?- dupli([a,b,c,c,d],X).
X = [a,a,b,b,c,c,c,c,d,d]
--}
dupli :: [a] -> [a]
dupli list = undefined
-- What is the sum of a list of numbers?
-- What is the sum of a list of duplicated numbers?
list0nums :: [Int]
list0nums = [50,88,47,46,55,35,4,66,27,65]
-- numbers generated at random.org