程序代写代做代考 Haskell CIS 252 In-class Activity #1 1 2 3

CIS 252 In-class Activity #1 1 2 3

Name:

Consider the following Haskell function:

contrived :: Int -> Int -> Int

contrived m n

| even m && m > n = n*2

| odd n || n<3 = m | otherwise = m+n+1 Fill in the table by giving the value of each expression. Expression Value contrived 100 7 contrived 16 100 contrived 321 7 contrived 44 0 contrived 95 0 contrived 28 15.0 24 January 2017

Posted in Uncategorized

Leave a Reply

Your email address will not be published. Required fields are marked *