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).
On Thursday 26 May 2011 14:35:41, Neil Brown wrote:Wouldn't that be also achievable with
> 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$.
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