Skip to content

Instantly share code, notes, and snippets.

@lnds
Created January 12, 2016 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lnds/f24ce824041c3127ef37 to your computer and use it in GitHub Desktop.
Save lnds/f24ce824041c3127ef37 to your computer and use it in GitHub Desktop.
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