
15 Jun
2005
15 Jun
'05
12:17 a.m.
Hi, I'm trying to do this: let f n = mod (n**5) 12 but I see that I can't because ** only operates on floats. Is there an equivalent operator that works on integers? How should I do that? Thanks, Maurício

15 Jun
15 Jun
12:39 a.m.
G'day all.
Quoting Maurício
but I see that I can't because ** only operates on floats. Is there an equivalent operator that works on integers? How should I do that?
Prelude> :t (**) (**) :: forall a. (Floating a) => a -> a -> a Prelude> :t (^) (^) :: forall a b. (Integral b, Num a) => a -> b -> a Hope this helps. Cheers, Andrew Bromage
7280
Age (days ago)
7280
Last active (days ago)
1 comments
2 participants
participants (2)
-
ajb@spamcop.net
-
Maurício