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

Reply via email to