3 ms·
yup. we have a "Functor" https://github.com/maxpow4h/swiftz/blob/master/swiftz/Unsound/Functor.swift https://github.com/maxpow4h/swiftz/blob/master/swiftz/Unsou
by maxpow4h 12y ago
yup. we have a "Functor" https://github.com/maxpow4h/swiftz/blob/master/swiftz/Unsound/Functor.swift https://github.com/maxpow4h/swiftz/blob/master/swiftz/Unsoun...
It requires constructing a "Functor" value manually, otherwise it works fine. You can still write functions over an A in Functor.
The Result enum bug presented you can work around by boxing the type, such as in https://github.com/maxpow4h/swiftz/blob/master/swiftz/List.swift https://github.com/maxpow4h/swiftz/blob/master/swiftz/List.s...
The third problem a work around exists for: remove the default argument. If you want an empty init, provide one.
Sure it is buggy, but you can express these programs.
- afthonos 12y agoThanks for the Box suggestion; I'll try it and see how it works for me. I wouldn't have thought of that workaround.