vendredi 23 novembre 2018

Test for positions- function

positions :: Eq a => a -> [a] -> [Int] positions x xs = [i | (x',i) <- zip xs [0..], x == x']

i need to create a Test function for the positions function, which passes the quickcheck.

Does someone has an idea?

Aucun commentaire:

Enregistrer un commentaire