Talk:Y combinator: Difference between revisions

From Rosetta Code
Content added Content deleted
No edit summary
Line 5: Line 5:


I googled [http://groups.google.co.uk/group/fa.haskell/browse_frm/thread/f0a62b6de1416d8b this]. --[[User:Paddy3118|Paddy3118]] 09:22, 28 February 2009 (UTC)
I googled [http://groups.google.co.uk/group/fa.haskell/browse_frm/thread/f0a62b6de1416d8b this]. --[[User:Paddy3118|Paddy3118]] 09:22, 28 February 2009 (UTC)

:It's impossible to write a fixed-point combinator (or perform any recursion, for that matter) in any statically-typed language, without using either recursive functions or recursive types. --[[User:Spoon!|Spoon!]] 10:42, 28 February 2009 (UTC)

Revision as of 10:42, 28 February 2009

Haskell stateless?

I don't know Haskell, but isn't the definition:

 y f = f (y f)

not stateless as it seems to be defining y by referring to y. Haskell, no doubt has lazy evaluation to make it terminate, but the task does ask for a non-recursive, stateless definition of y. --Paddy3118 09:18, 28 February 2009 (UTC)

I googled this. --Paddy3118 09:22, 28 February 2009 (UTC)

It's impossible to write a fixed-point combinator (or perform any recursion, for that matter) in any statically-typed language, without using either recursive functions or recursive types. --Spoon! 10:42, 28 February 2009 (UTC)