Haskell’s
In Haskell, the fix
fix
function takes some f :: a -> a
and returns the least defined x
such that f x = x
Example. fix (3 :)
gives an infinite list of 3
s. The result isn’t ⊥
because f ⊥ = 3:⊥ ≠ ⊥
.
fix
fix
function takes some f :: a -> a
and returns the least defined x
such that f x = x
Example. fix (3 :)
gives an infinite list of 3
s. The result isn’t ⊥
because f ⊥ = 3:⊥ ≠ ⊥
.