dealing out 5 hands of cards, each containing 5 cards
I helped someone out in
#haskell with the problem stated in the subject by writing the code below. I'm a bit rusty (and never was very good) at Haskell, so any pointers on how to improve the code I supplied to him are appreciated.
cards = [1..52]
dropAmount = [ d*5 | d <- [0 .. 4 ] ]
hand cards = map (\d -> (take 5 $ drop d cards)) dropAmount