to write imperative code anyways: can't you simply
use a specialized state monad with the array(s) hidden inside the
monad as monad state?
-Matthias
--
Matthias Neubauer |
Universität Freiburg, Institut für Informatik | tel +49 761 203 8060
Georges
mean.
-Matthias
--
Matthias Neubauer |
Universität Freiburg, Institut für Informatik | tel +49 761 203 8060
Georges-Köhler-Allee 79, 79110 Freiburg i. Br., Germany | fax +49 761 203 8052
___
Haskell-Cafe
]
perm' n = foldr (takeIter n (rotate n)) []
takeIter :: Int - (a - a) - a - [a] - [a]
takeIter 0 f x rest = rest
takeIter n f x rest = x : takeIter (n-1) f (f x) rest
gains us another 5% or so.
-Matthias
--
Matthias Neubauer |
Universität Freiburg
then Just seat_num else Nothing
return $ guard (cmdType cmd /= CmdSitError Serv) return seat_num
-Matthias
--
Matthias Neubauer |
Universität Freiburg, Institut für Informatik | tel +49 761 203 8060
Georges-Köhler-Allee 79, 79110 Freiburg i. Br., Germany
is of type () ... :-)
-Matthias
--
Matthias Neubauer |
Universität Freiburg, Institut für Informatik | tel +49 761 203 8060
Georges-Köhler-Allee 79, 79110 Freiburg i. Br., Germany | fax +49 761 203 8052
-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe
--
Matthias Neubauer |
Universität Freiburg, Institut für Informatik | tel +49 761 203 8060
Georges-Köhler-Allee 79, 79110 Freiburg i. Br., Germany | fax +49 761 203 8052
outputCode submitCode nextPage h = do
let i = validationCode h
standardQuery Result Page $ table $ do
tr $ td $ text Your input was ...
tr $ td $ outputCode i
tr $ td $ submitCode nextPage
--
Matthias Neubauer |
Universität Freiburg, Institut
John Goerzen [EMAIL PROTECTED] writes:
On Fri, Feb 25, 2005 at 04:15:55PM +0100, Matthias Neubauer wrote:
standardQuery Input Page $ table $ do
do tr $ td $ text Hello!
h - inputCode
tr $ td $ text Press the button!
tr $ td $ submitCode h nextPage
I like
clarify how to do it ...
...
% iName - inputField (fieldSIZE 40 ## fieldMAXLENGTH 40 ## fieldVALUE name
## attr class name) %
...
-Matthias
--
Matthias Neubauer |
Universität Freiburg, Institut für Informatik | tel +49 761 203 8060
Georges