[Haskell-cafe] How do you make constant expressions?

Eitan Goldshtrom thesourceofx at gmail.com
Sun Jul 18 17:07:38 EDT 2010


So just so I get this straight, the following are equivalent to the 
computer, after compiling:

1.
fact = 10
{-# INLINE fact #-}

func x = x * fact

2.
func x = x * 10

I'm also curious as to what the {-# #-} brackets represent. I've never 
seen those before.

-Eitan


More information about the Haskell-Cafe mailing list