Proposal: Add <&> to Data.Functor

The <&> operator is rather popular: (<&>) :: Functor f => f a -> (a -> b) -> f b (<&>) = flip fmap Now that we have (&) in Data.Function, I think we should have (<&>) in Data.Functor.

+1
вс, 21 Авг 2016 г., 20:23 David Feuer
The <&> operator is rather popular:
(<&>) :: Functor f => f a -> (a -> b) -> f b (<&>) = flip fmap
Now that we have (&) in Data.Function, I think we should have (<&>) in Data.Functor. _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

+1 for consistency
On Aug 21, 2016 3:53 PM, "John Wiegley"
"NV" == Nikita Volkov
writes: NV> +1
+1
-- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 _______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 I like symmetry and consistency -- so +1. Although I still wish we had (<|) and (|>) rather than ($) and (&). Oh well. - -- Alexander alexander@plaimi.net https://secure.plaimi.net/~alexander -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCgAGBQJXutLHAAoJENQqWdRUGk8BBzAQALjLTqdfLf6ufckUXIzNoIHK Rccv+Si9y/IWEusichUZLcr7N1uJ7uikp7wX0yhWTC5zDGI1jTYZH1QkTolQpy3T VxOqD+Knduqn2JrJoKxEi//q4aVFNvcrQa0phljo2dNNjBsGVNSFSAdwp6jF/Pp7 W8F219INjulD9xKOf5Z7Q17Xmz/1arFfwAHU6smXTpWrqSeQQ5Mm3/hfYlrLhEN6 CZTO5LCTl6ZkPSMr17RQncZlyQrMZdMk0JWCA7r5ieSjAE4KH9sCDRwDzrxUBh6j LF6jQiuz2fBTvwGa/8UK1Ff5frs+DTTNij298yvyNrUTpt6CHLQPRfu5/C6VNFPR vvgdq/NUGZ7QtCm4g1zfcjdNdApDED9FI+S8rfhUwCrF2qhiIKJagt4mnTMPAOA5 15m746h3m4NYMkMFplC3IQ9O6vG1uNebjFNzEUPqreSbereTfaAyIC11GELiFUnL QMkCpQilhY7HE045jYvVPVK/15FuurvOzkxoh6ecLrH8IBWA/jNgwF3aeIwu5Rgz aGqEyMtKZnZKtHusCLEgl+JBkOqh3Qxm/jWStNMhS3mA1wE3AdCYchS2svrVrS7u WTml70HO/bNWBZMxk794VlYVp8XAeuM7U65g6EIW0Thgtaetj+UeEVTJbD3hJhsp GkgJQMRGhaEiaCKKZrrq =NdEr -----END PGP SIGNATURE-----

+1. On 22.08.2016 01:27, evan@evan-borden.com wrote:
+1 for consistency
On Aug 21, 2016 3:53 PM, "John Wiegley"
mailto:johnw@newartisans.com> wrote: >>>>> "NV" == Nikita Volkov
mailto:nikita.y.volkov@gmail.com> writes: NV> +1
+1
-- John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 _______________________________________________ Libraries mailing list Libraries@haskell.org mailto:Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
-- Andreas Abel <>< Du bist der geliebte Mensch. Department of Computer Science and Engineering Chalmers and Gothenburg University, Sweden andreas.abel@gu.se http://www2.tcs.ifi.lmu.de/~abel/

infixl 1 I assume? (lens and some other libs agree on this fixity already.)
(also, +1) On 21/08/16 19:23, David Feuer wrote:
The <&> operator is rather popular:
(<&>) :: Functor f => f a -> (a -> b) -> f b (<&>) = flip fmap
Now that we have (&) in Data.Function, I think we should have (<&>) in Data.Functor.
_______________________________________________ Libraries mailing list Libraries@haskell.org http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries

I'd presume we'd keep the current fixity. It plays much nicer when mixed
with >>= and the like, and it doesn't mix with the <$> <*> crowd despite
appearances anyways even if you give it the "obvious" fixity.
-Edward
On Thu, Sep 1, 2016 at 4:53 AM, lennart spitzner wrote: infixl 1
I assume? (lens and some other libs agree on this fixity already.) (also, +1) On 21/08/16 19:23, David Feuer wrote: The <&> operator is rather popular: (<&>) :: Functor f => f a -> (a -> b) -> f b
(<&>) = flip fmap Now that we have (&) in Data.Function, I think we should have (<&>) in
Data.Functor. _______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries _______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries
participants (8)
-
Alexander Berntsen
-
Andreas Abel
-
David Feuer
-
Edward Kmett
-
evan@evan-borden.com
-
John Wiegley
-
lennart spitzner
-
Nikita Volkov