Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread Matthias Neubauer
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

Re: [Haskell-cafe] idea for avoiding temporaries

2007-03-08 Thread Matthias Neubauer
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

Re: [Haskell-cafe] Re: Shootout summary

2006-01-07 Thread Matthias Neubauer
] 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

Re: [Haskell-cafe] Shortening if-then-else

2005-11-22 Thread Matthias Neubauer
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

Re: [Haskell-cafe] Shortening if-then-else

2005-11-22 Thread Matthias Neubauer
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

Re: [Haskell-cafe] Shortening if-then-else

2005-11-22 Thread Matthias Neubauer
-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

Re: [Haskell-cafe] YAWQ (Yet Another Wash Question)

2005-02-25 Thread Matthias Neubauer
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

Re: [Haskell-cafe] YAWQ (Yet Another Wash Question)

2005-02-25 Thread Matthias Neubauer
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

Re: [Haskell-cafe] WASH defaults in inputFields

2005-02-23 Thread Matthias Neubauer
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