FP Laboratory 4

From Marek Běhálek Wiki
Revision as of 10:58, 17 September 2019 by Beh01 (talk | contribs) (Created page with "== Functions working with lists and tuples == Implement following functions: * Create a function that find the smallest element in the list. Consider input restrictions. <syn...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Functions working with lists and tuples

Implement following functions:

  • Create a function that find the smallest element in the list. Consider input restrictions.
minimum :: [a] -> a -- Is this right?
  • Find all prime divisors of a given number.
divisors :: a -> [a]
  • Create a function that merge two lists into one list of tuples.
zipThem:: [a] -> [b] -> [(a,b)]
  • Create a function that merge two lists into one list of tuples.
zipThem:: [a] -> [b] -> [(a,b)]