Skip to content

Instantly share code, notes, and snippets.

@apeyroux
Created February 9, 2014 22:41
Show Gist options
  • Save apeyroux/8907158 to your computer and use it in GitHub Desktop.
Save apeyroux/8907158 to your computer and use it in GitHub Desktop.
Test d'une calculette scrabble en une ligne
(mapM (\l -> putStr ("Point for " ++ show l ++ " ? : ") >> getLine >>= (\p -> return (read p::Int))) "mot") >>= return . foldr (+) 0 >>= (\x->do r<-(putStr "Bonus coef ? : " >> getLine >>= (\b -> return (read b::Int))); print $ r*x)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment