[Haskell-cafe] Call for GUI examples - Functional Reactive Programming

Felipe Almeida Lessa felipe.lessa at gmail.com
Sun Jul 10 14:14:00 CEST 2011


On Sat, Jul 9, 2011 at 7:58 AM, Henning Thielemann
<lemming at henning-thielemann.de> wrote:
> My stream processors are not Arrows, because 'first' cannot be implemented.
> However, 'arr' and '.' can be implemented.
...
> Since I have no Arrow instance I even have to write my own combinators that
> are counterparts to (&&&) and friends.

If you have arr, (.) and (&&&), then you have first as well:

  f **** g = (arr fst >>> f) &&& (arr snd >>> g)

  first' f = f **** arr id

Am I missing something here? =)

Cheers,

-- 
Felipe.



More information about the Haskell-Cafe mailing list