[Haskell-beginners] Double usage of a wire (arrow)

Nathan Hüsken nathan.huesken at posteo.de
Mon Nov 5 15:12:00 CET 2012


Hey,

If I double use an arrow (in this example a wire from netwire) like this:

objectWire :: WireP [Collision] Object
objectWire = (Object <$> integral_ initPos) . speedWire <*> speedWire

will it be double evaluated, or can the compiler optimize this to
evaluate speedWire only once?

Thanks!
Nathan



More information about the Beginners mailing list