5 ms·
There aren't that many of them in the Prelude and common libraries. Besides the standard arithmetic ones, only ones I can think of are the "fish" operators, co
by Peaker 15y ago
There aren't that many of them in the Prelude and common libraries.
Besides the standard arithmetic ones, only ones I can think of are the "fish" operators, composition dot, and a few arrows.
Did you try to learn what they mean, or did you give up earlier than that?
- lubutu 15y agoTo be precise: cons (:), bind (>>=), 'constant bind' (>>), 'flipped bind' (=<<), compose (.), apply ($), strict apply ($!), append (++), and subscript (!!).
- joeyh 15y agoI had never seen $! before, of course it's obvious what it does if you know ! and $. There are patterns like this throughout the operators. There are also the applicatives <$> <*> <$ etc.
- adrusi 15y agoalso in Data.List (which is a fairly common import) there are a few, like (\\) which is list difference ([1, 2, 3, 4, 5, 6] \\ [1, 3, 6] == [2, 4, 5]), and I can't really think of any others. There aren't really that many, though some modules will abuse them. The standard ones make sense.