[Haskell-beginners] A try on a bank machine algorithm...

Bernhard Lehnert b.lehnert at gmx.de
Mon Jun 1 13:27:47 EDT 2009


Hi,

> Ok, I don't really think I know what you are planing to do. 
> cashout 175 [200,100,50,20,10,5] == [0,1,1,1,0,1]


> It sounded to me a little different: like if you withdraw 200 €, you
> don't just want a 200 € bill, you want some small bills too: so you
> would get two 5s, two 10s, a 20, a 50, and a 100.

thank you so far. Yes, Brent, you are right. I wanted to do what my
program does, and moreover become a better Haskell programmer. So even
if I could not explain myself to Thomas on the first attempt, I honestly
like to study his very short and efficient code in my attempt to get a
feeling for "good" code. 

Thanks for all your help,
Bernhard



More information about the Beginners mailing list