[Swift-user] Re: [Swift-devel] Problem with iterate

Mihael Hategan hategan at mcs.anl.gov
Fri Feb 19 19:06:11 CST 2010


On Fri, 2010-02-19 at 17:54 +0000, Ben Clifford wrote:
> A point of information related to this discussion:
> 
> Underordered single assignment doesn't necessarily lead to deadlock in 
> general. Using Haskell, and making this mutually recursive definition of x 
> and y.
> 
> f l = 1 : l     -- if you like lisp,  1:l means (cons 1 l)
> 
> x = f y
> y = f x
> 
> main = print x

Also, try this:

f l = length l : l
x = f y
y = f x
main = print x

;)




More information about the Swift-user mailing list