Vectorized functions

Paul Rubin no.email at nospam.invalid
Thu Aug 11 00:09:47 EDT 2016


Steven D'Aprano <steve+python at pearwood.info> writes:
> Is there any other functionality which would make this more useful?

Cute, but map or listcomps work ok.  Here's the Haskell equivalent to
your example, fwiw, using the <$> operator from the Control.Applicative
module:

(+2) <$> [1,2,3]   =>   [3,4,5]

If you haven't tried Haskell yet, you might enjoy it.
http://learnyouahaskell.com is a good place to start.



More information about the Python-list mailing list