Create a gist now

Instantly share code, notes, and snippets.

@lnds /tyf.hs
Created Jan 12, 2016

What would you like to do?
Toques y Famas calculados en Haskell
toques_y_famas [] _ _ = (0,0)
toques_y_famas (n:ns) (x:xs) ys
| n == x = (t,1+f)
| n `elem` ys = (t+1, f)
| otherwise = (t,f)
where (t,f) = (toques_y_famas ns xs ys)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment