Homework Solution: Could you please answer this question:…

    Could you please answer this question: For this two exercises, develop and test a Haskell function : 1).The time of day can be represented by a tuple (hours,minutes,m) where m indicates either "AM" or "PM". Develop a Boolean Haskell function comesBefore that takes two time-of-day tuples and determines whether the first is an earlier time than the second. (Note: Consider midnight and noon.) 2)Develop a Haskell function
    minf :: (Int -> Int) -> Int
    
    such that minf g returns the smallest integer m such that 0 <= m <= 10000000 and g m == 0 (if such an integer exists). Function minf is a higher-order function It takes ONE argument g and returns an Int g is itself a function that takes an Int and returns an Int A call minf g searches the range from 0 through 10,000,000 for the smallest integer m that makes g m == 0 There might not be such an integer, so you have to take this into account. Here is one example of a g
        g :: Int -> Int     g n | n > 1000 = 0     g n            = n
    
    Then
        minf g == 1001
    

    Expert Answer

    Could you delight repartee this question:

    For this brace exercises, amplify and experience a Haskell business :

    1).The opportunity of day can be represented by a tuple (hours,minutes,m) where m indicates either “AM” or “PM”. Amplify a Boolean Haskell business comesBefore that catchs brace opportunity-of-day tuples and determines whether the original is an antecedent opportunity than the cooperate. (Note: Consider midnight and noon.)

    2)Amplify a Haskell business

    minf :: (Int -> Int) -> Int
    

    such that minf g receipts the lowest integer m such that 0 <= m <= 10000000 and g m == 0 (if such an integer exists).

    Business minf is a higher-order business

    It catchs ONE dispute g and receipts an Int

    g is itself a business that catchs an Int and receipts an Int

    A wheedle minf g searches the ramble from 0 through 10,000,000 for the lowest integer m that makes g m == 0

    There agency not attributable attributable attributable be such an integer, so you keep to catch this into statement.

    Here is single pattern of a g

        g :: Int -> Int     g n | n > 1000 = 0     g n            = n
    

    Then

        minf g == 1001
    

    Expert Repartee