Re: [haskell-exercises] Partial Functions in Haskell

51 views
Skip to first unread message
Message has been deleted

Tony Morris

unread,
Oct 31, 2017, 2:48:58 AM10/31/17
to Mirasol Davila, haskell-exercises
Try this:

f :: (Int -> Bool)
f n
    | n `rem` 5 == 0 = False
    | otherwise = True

On Tue, Oct 31, 2017 at 4:33 PM, Mirasol Davila <mirasol...@gmail.com> wrote:
Hello,

I'm really lost with partial functions. I want to understand how I can get a single integer and divide by a number where it returns an Bool. 


f :: Bool ->  (Int -> Int)
f n
    | n `rem` 5 == 0 = False
    | otherwise = True







--
You received this message because you are subscribed to the Google Groups "haskell-exercises" group.
To unsubscribe from this group and stop receiving emails from it, send an email to haskell-exercises+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
Message has been deleted
0 new messages