Scala, Haskell's $
benzeri bir operatöre sahip mi?
-- | Application operator. This operator is redundant, since ordinary
-- application @(f x)@ means the same as @(f '$' x)@. However, '$' has
-- low, right-associative binding precedence, so it sometimes allows
-- parentheses to be omitted; for example:
--
-- > f $ g $ h x = f (g (h x))
--
-- It is also useful in higher-order situations, such as @'map' ('$' 0) [email protected],
-- or @'Data.List.zipWith' ('$') fs [email protected]
{-# INLINE ($) #-}
($) :: (a -> b) -> a -> b
f $ x = f x
Soruyu tek başına yapmak adına, Haskell'in yaptıklarını/yaptıklarını açıkladıysanız hoş olurdu. –
$ görünüşte doğru-ilişkilendirici ve düşük bir önceliğe sahiptir http://learnyouahaskell.com/higher-order-functions#function-application. – huynhjl