When should I use $ (and can it always be replaced with parentheses)?

Posted by J Cooper on Stack Overflow See other posts from Stack Overflow or by J Cooper
Published on 2008-12-28T08:56:58Z Indexed on 2010/04/07 2:33 UTC
Read the original article Hit count: 322

Filed under:
|
|

From what I'm reading, $ is described as "applies a function to its arguments." However, it doesn't seem to work quite like (apply ...) in Lisp, because it's a binary operator, so really the only thing it looks like it does is help to avoid parentheses sometimes, like foo $ bar quux instead of foo (bar quux). Am I understanding it right? Is the latter form considered "bad style"?

© Stack Overflow or respective owner

Related posts about haskell

Related posts about operators