Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Replacing do by >>= for a scotty post

Tags:

haskell

post "/introduceAnIdea"  $ do
        command <- jsonData
        json $ handle command

How would you remove the do and change it with >>= ?

like image 411
Nicolas Henin Avatar asked Jan 28 '23 12:01

Nicolas Henin


1 Answers

post "/introduceAnIdea" $ jsonData >>= (json . handle)

I don't think that's necessarily better in this case though.

like image 99
Cubic Avatar answered Feb 05 '23 01:02

Cubic