Question: [Haskell] 1.) Rewrite prob1 so that it uses >>= instead of do notation. Please use >>= , not >> 2.) Rewrite prob2 so it uses
[Haskell]
![[Haskell] 1.) Rewrite prob1 so that it uses >>= instead of do](https://s3.amazonaws.com/si.experts.images/answers/2024/09/66dceb09e0b47_12166dceb0958a93.jpg)
1.) Rewrite prob1 so that it uses >>= instead of do notation. Please use >>= , not >>
2.) Rewrite prob2 so it uses do notation
3.) Modify prob3 so it does the same computations as prob2, except with explicit state-passing
module Basics where import Control.Monad.State.Lazy probl:: 1o [integer] probl = do putStrin "probl" return [1,2,3] prob2 : State Integer Integer prob2 = get >>= (\ x-> put (x + x) >> return 1) type sta s a = s-> (sa) prob3 : Sta Integer Integer prob3 s (ss)--fill this in reverseArgs : 10 [String] revers eArgs = return [] getFirstArgif: IO (Maybe String) getFirstArgf = return Nothing -(Unix) Basics.hs All L16SVN-29479-(Haskell1nteractive lnd) Welcame to GNU Emacs, a part of the GNU operating system
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
