What is the difference between the dot (.)
and the dollar sign ($)
?
As I understand it, they are both syntactic sugar for not needing to us
A great way to learn more about anything (any function) is to remember that everything is a function! That general mantra helps, but in specific cases like operators, it helps to remember this little trick:
:t (.)
(.) :: (b -> c) -> (a -> b) -> a -> c
and
:t ($)
($) :: (a -> b) -> a -> b
Just remember to use :t
liberally, and wrap your operators in ()
!