When using this hack, I prefer `fromInteger x = repeat (fromInteger x)`. That way, you get

    > 2 * [1,2,3]
    [2,4,6]

It's cute for playing around, but the Num instance for lists is somewhat discouraged in "real" code.


-- Dan Burton


On Fri, Dec 13, 2013 at 10:15 AM, Dario Bertini <berdario@gmail.com> wrote:
I guess you meant

(*) = zipWith (*)
?

Dumb question: would it be fine to use such an instance in real world
application code (in contrast with library code... I guess it would be
frowned upon there?)

are there any "dangers"... weird interactions?

--
xmpp: berdario@gmail.com
bitmessage: BM-2cTYXfGiSTsnx3righ6aHcJSWe4MV17jDP
gpg fingerprint: 3F8D53518012716C4EEF7DF67B498306B3BF75A0 (used just
for signing commits)
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe