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

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!