4 ms·
"I wonder how they're related?" You could replace `id' with something that expands things, like \x -> (x,x): let f = \x -> (x,x) in (f.f.f.f.f.f) () Now
by throwaway_yy2Di 12y ago
"I wonder how they're related?"
You could replace `id' with something that expands things, like \x -> (x,x):
let f = \x -> (x,x) in (f.f.f.f.f.f) ()
Now it builds exponentially large tuple types. (?) And going back to the example in the blog:
let f = \x -> (x,x) in (f.f.f.f.f.f) id
This is the same as the spacemanaki's example, without explicitly labeling the d1,d2,d3... intermediates.
- spacemanaki 12y agoActually, these examples are similar to the first example in my post (under the first "pathological case" heading) and don't quite exhibit the worst case behavior since the type can be represented in linear space as a dag.