0

Is there a built in version of this operator or is there a package that has this operator? Hoogle did not come up with anything.

infixl 0 &*
x &* f = fmap f x

getLine &* map toUpper >>= putStrLn
michaelmesser
  • 3,601
  • 2
  • 19
  • 42
  • Isn't that just [`<$>`](https://hackage.haskell.org/package/base-4.9.0.0/docs/Data-Functor.html#v:-60--36--62-)? – Bakuriu Jul 01 '16 at 12:15
  • @Bakuriu `<$>` has the arguments in the wrong order – michaelmesser Jul 01 '16 at 12:16
  • 2
    Actually `flip fmap` / `flip <$>`. `lens` [has this by the name `<&>`](https://www.haskell.org/hoogle/?hoogle=Functor+f+%3D%3E+f+a+-%3E+%28a-%3Eb%29+-%3E+f+b+%2Blens). Not with fixity 0 though, which doesn't seem advisable either, IMO. – leftaroundabout Jul 01 '16 at 12:16
  • @leftaroundabout That was what I was looking for. If you make it an answer I will accept it. – michaelmesser Jul 01 '16 at 12:17

0 Answers0