3 ms·
If you're going to introduce a generic functor fixpoint then you'll probably want to define type Tree a = Fix (TreeF a) so that `toTreeF` is just `unfix`
by chombier 4y ago
If you're going to introduce a generic functor fixpoint then you'll probably want to define
type Tree a = Fix (TreeF a)
so that `toTreeF` is just `unfix` (and is effectively free, as I mentioned above)
- solomonb 4y agoYeah you could do that but now you have thrown away the recursive `Tree` type and are always working in `TreeF`. This is totally fine but is a different design decision from where we started.