From: Jiri S. <jir...@bl...> - 2008-07-06 07:56:56
|
Eddie Rucker napsal(a): > Jiri, can you show me how you defined the => operator? > > I had something like > infix 2 => ; > > I never gave it a real definition except inside of a zipwith like > zipwith (\(x=>y) z -> ...) ... > > I had to give at least a precedence of 2 because it is the only way I could get it *not* to give a syntax error on something like > [1=>"a",2=>"b"] > Originally I defined it according to Albert's suggestion as infix 0. After reading this discussion I changed it to infix 2. Since I used 'zipwith (=>) ...' to test my stuff I didn't notice the problems with writing the lists manually. However, isn't there something wrong with displaying the data: > infix 0 => ; > zipwith (=>) (1..3) (1.0..3.0); [1=>1.0,2=>2.0,3=>3.0] > I would expect '[(1=>1.0),(2=>2.0),(3=>3.0)]' in such a case. Jiri |