That's a useful operator! Unfortunately it does not play nice with $. Of less importance: some syntactic constructs can not appear in the arguments without parenthesis, let bindings for instance (although lambda abstraction works parenthesis-free).
Also I'm not sure this can be used for defining trees or nested function application since a nesting of the operator inevitably require parenthesis. /J On 26 May 2011 14:52, Daniel Fischer <daniel.is.fisc...@googlemail.com>wrote: > On Thursday 26 May 2011 14:35:41, Neil Brown wrote: > > foo is the function we want to apply, and eg shows how to apply it in > > do-notation with an argument on each line. I couldn't manage to remove > > the r$ at the beginning of each line, which rather ruins the whole > > scheme :-( On the plus side, there's no brackets, it's only two extra > > characters per line, and you can have whatever you like after the r$. > > Wouldn't that be also achievable with > > infixl 0 ? > > (?) :: (a -> b) -> a -> b > f ? x = f x > > eg = foo > ? 2 + 1 > ? 'c' > ? "hello" ++ "goodbye" > ? 3.0 > > ? > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe >
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe