Talk:Y combinator: Difference between revisions
Content added Content deleted
No edit summary |
(→Haskell stateless?: Recursive types?) |
||
Line 7: | Line 7: | ||
: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) |
: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) |
||
Hi Spoon, The task does not rule out recursive types (I didn't know what they were at the time of writing) - just recursive functions. --[[User:Paddy3118|Paddy3118]] 11:05, 28 February 2009 (UTC) |
Revision as of 11:05, 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)
Hi Spoon, The task does not rule out recursive types (I didn't know what they were at the time of writing) - just recursive functions. --Paddy3118 11:05, 28 February 2009 (UTC)