Re:Optimizing Guile Scheme
by Iceland_jack on Saturday September 28, 2024 @04:52AM
(#41678910)
Maybe you meant to write
(??) :: Functor f => f (a -> b) -> a -> f b
funs ?? a = fmap ($ a) funs
from lens: https://hackage.haskell.org/package/lens-5.3.2/docs/Control-...This is valid definition of lift along a different, less interesting but more general axis.
lift = (??) @[]
It is possible to fill in basic function bodies based on their type, using ghc-justdoit (https://hackage.haskell.org/package/ghc-justdoit). That's maybe not what you meant, if you are looking for integrating pointfree into Haskell it can be added to ghci or your development environment.
In this case I wrote it because I knew about the pattern. Your lift definition is just ($)