arrows

exposition on arrows in haskell

What would be a good place to go to understand arrows? Ideally, I am just looking for some place with a concise definition with motivation from some good examples, something similar to Wadler's exposition on monads. ...

Keyboard up and down arrows.

Hi, I have one autocomplete search, in which by typing few characters it will show all the names, which matches the entered character. I am populating this data in the jsp using DIV tag, by using mouse I'm able to select the names. But I want to select the names in the DIV tag to be selected using the keyboard up and down arrow. Can any...

jQuery Using a slider and arrow links to create custom horizontal scroll bar

I have made a lot of progress on this, but there is a part I am missing and it seems like it should be simple. I have a horizontal div and I am using something similar to this: http://www.switchonthecode.com/tutorials/using-jquery-slider-to-scroll-a-div But I also want to include arrows on the side so that the user can move the slider ...

simple putStrLn in Haskell/Yampa with arrows syntax

i'm using Haskell with the Yampa FRP library which uses the arrows language extension. how can i do a simple putStrLn in a SF? mySF = proc x -> do y <- identity -< x*x putStrLn "Hello World!" ++ show y returnA -< y the arrow syntax complains about the expression not bein an arrow (of course), but even with arrows i get no...

Help Understanding Arrows in Haskell

I've been trying to get a grip on arrows, since they're the basis of most FRP implementations. I think I understand the basic idea - they're related to monads but store static information at each bind operator so you can walk through a chain of arrows and look at the static information without having to evaluate the whole arrow. But I ...

How to write custom arrowheads in Graphviz

I use Graphviz (mainly dot and fdp) to automatically generate some diagrams that I need. For these diagrams I need some special arrow heads that are not a part of the standard collection of arrows: A small black triangle inside a large white triangle, and the same with the black triangle pointing downwards. What is the best way to add s...

Monads vs. Arrows

I'm broadly familiar with the concepts of monads and arrows as used in functional programming. I also understand that they can be used to solve similar kinds of problems. However - I'm still a bit confused about how to select which one to use in any given situation. When should I use monads and when should I use arrows? ...

Haskell: Am I misunderstanding how Arrows may be used?

I wrote some toy code to play with the concept of Arrows. I wanted to see if I could write an Arrow which encoded the concept of a stateful function - giving a different value after different calls. {-# LANGUAGE Arrows#-} module StatefulFunc where import Control.Category import Control.Arrow newtype StatefulFunc a b = SF { unSF :: a ...

What needs to be passed to an editor from a keyboard app to move the cursor one char left?

What key code does an Android editor app expect the keyboard app to send when it is going to be interpreted as a left arrow? In other words, what is the keyboard program supposed to send to its calling program (some kind of editor) if the user intends to move the cursor one char to the left? A related issue: what do the minus values for ...

Can you define an operator (***) in F#?

I'm working on Arrows in F# and I wanted to create a *** operator. I note, however, that (***), the necessary way to express an operator in a function definition, overlaps with the F# block comment syntax. So how could you actually express this? I thought of maybe .***. but I think that will actually treat the dots as part of the ope...

Collapse arrow to list

I'm having some problems with HXT, though I suspect it's just something I'm missing about arrows. I have an XML structure like <str name="field1">value</str> <lst name="field2"><str>value2</str><str>value3</str></lst> And internal structure like data XmlData = XmlStr String | XmlList XmlData Is there a way to collect elements at a...