RE: [Haskell-cafe] Implicit parameters and Arrows/Yampa?

2008-01-07 Thread Peter Verswyvelen
Wow, amazing :) How long did it take you to write this little nice example? Examples like this are really welcome. It will take me a while to decipher, but that's the fun of Haskell, it's an endless learning experience! Here's a thought: I hardly know Haskell, but I can already write some cod

Re: [Haskell-cafe] Implicit parameters and Arrows/Yampa?

2008-01-07 Thread Derek Elkins
On Mon, 2008-01-07 at 17:24 +0100, Peter Verswyvelen wrote: > Derek Elkins wrote: > > Implicit parameters add an extra argument to a function conceptually. > > What you need is to "add an argument" to "SF" which implicit parameters > > don't know how to do since SF is just some data structure. One

Re: [Haskell-cafe] Implicit parameters and Arrows/Yampa?

2008-01-07 Thread Claude Heiland-Allen
Peter Verswyvelen wrote: Derek Elkins wrote: you can use an equivalent Reader/Environment arrow transformer. Nice, I did not know that monad yet, thanks! But can it be combined together with the arrows do/proc syntax? How would that look like? Something like this? 8< module M

Re: [Haskell-cafe] Implicit parameters and Arrows/Yampa?

2008-01-07 Thread Peter Verswyvelen
Derek Elkins wrote: Implicit parameters add an extra argument to a function conceptually. What you need is to "add an argument" to "SF" which implicit parameters don't know how to do since SF is just some data structure. One way to deal with this is the way you deal with the same problem in Hask

Re: [Haskell-cafe] Implicit parameters and Arrows/Yampa?

2008-01-06 Thread Derek Elkins
On Sun, 2008-01-06 at 23:44 +0100, Peter Verswyvelen wrote: > If I understand it correctly, implicit parameters in Haskell allow you > to pass values to functions with explicitly adding a parameter to each > of the functions being “called” (I appologize for my imperative > terminology here. How wou