RE: derivative (S f g) ?

2002-05-21 Thread Zhanyong Wan
Hi Conal, I don't have any pointers, but here's my attempt to derive the general rule for derivatives of application of S: D (S f g) x = d(S f g t) / dt | t = x = d(f t (g t)) / dt | t = x = D1 f t (g t) * dt/dt + D2 f t (g t) * d(g t)/dt | t = x (#) where D1 and D2 are partial derivative

RE: Compiler error using IO

2002-01-04 Thread Zhanyong Wan
Hi, Ashley Yakeley wrote: | The "layout" rules drive me nuts. You might prefer using parentheses and | semicolons, as I do: I guess the point behind the layout rules is that anything violating such rules is considered bad programming style. I agree that Haskell compilers/interpreters should gi

RE: Compiler error using IO

2002-01-03 Thread Zhanyong Wan
| When trying to right IO I continually run across this | sort of compile error which I just don't understand. | Any help would be very muich appreciated. | | Function: | | | while :: IO Bool -> IO () -> IO () | | while test action = do res <- test | if res then do action

Re: Functional programming in Python

2001-05-25 Thread Zhanyong Wan
"S. Alexander Jacobson" wrote: > > Does anyone know why the haskell designers did not make the syntax > right associative? It would clean up a lot of stuff. > > Haskell Non-Haskell > Left AssociativeRight Associative > foo (bar (baz (x)))

Re: How to force evaluation entirely?

2000-09-26 Thread Zhanyong Wan
the following is more general: > instance (Eager a, Eager b) => Eager (a, b) where > eager xy@(x, y) = eager x `seq` eager y `seq` xy Ultimately, generic Haskell may come handy. -- Zhanyong Wan Dept of Computer Science, Yale University