Created
January 12, 2016 02:00
-
-
Save lnds/f24ce824041c3127ef37 to your computer and use it in GitHub Desktop.
Toques y Famas calculados en Haskell
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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