Thread View: pl.comp.lang.funkcyjne
1 messages
1 total messages
Started by lowik86
Wed, 08 Aug 2007 12:01
problem z pasec
Author: lowik86
Date: Wed, 08 Aug 2007 12:01
Date: Wed, 08 Aug 2007 12:01
17 lines
1412 bytes
1412 bytes
ze strony http://legacy.cs.uu.nl/daan/download/parsec/parsec.html
wrzucilem taki kawalek kodu:
price :: Parser Int -- price in cents
price = lexeme (do{ ds1 <- many1 digit
; char '.'
; ds2 <- count 2 digit
; return (convert 0 (ds1 ++ ds2))
})
<?> "price"
where
convert n [] = n
convert n (d:ds) = convert (10*n + digitToInt d) ds
i wywala mi blad : Variable not in scope: 'digitToInt'
co robie nie tak?
musza importowac jakis modul?ale jakie?z gory dzieki
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads