[Haskell-beginners] variables in haskell
Brandon S. Allbery KF8NH
allbery at ece.cmu.edu
Mon Oct 13 22:32:29 EDT 2008
On 2008 Oct 13, at 2:58, Matthew J. Williams wrote:
> Hello listers, would one be correct in thinking that 'bound
> variables' such as those used in haskell were in fact constants?
Only in certain limited circumstances. Consider the following:
> let x = f x in x
This finds the least defined fixed point of f. See < http://en.wikibooks.org/wiki/Haskell/Fix_and_recursion
>.
Top level constant applicative forms (that is, bindings without
arguments) with monomorphic types can generally be considered to be
constants, and the compiler may assume this and inline it. But it's
not required to do so.
--
brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university KF8NH
More information about the Beginners
mailing list