Created
November 6, 2013 16:27
-
-
Save AngusP/7339268 to your computer and use it in GitHub Desktop.
Answer to q1 tut6
This file contains 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
longestProductLen :: [(Barcode, Item)] -> Int | |
longestProductLen xs = hold xs 0 | |
where | |
hold [] l = l | |
hold ((b,(name,i)):xs) longest | |
| length name > longest = hold xs (length name) | |
| otherwise = hold xs longest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment