[Haskell-cafe] Types of partially instantiated polymorphic helper functions
Todd Wilson
twilson at csufresno.edu
Tue Nov 24 22:26:03 UTC 2020
Dear Cafe,
This has got to be a trivial question, but I don't see a solution, nor
could I find anything through searching: If I want to write a type
declaration for the helper function g here, what do I write?
f :: a -> [b] -> [(a,b)]
f a bs = g bs where
g :: ????
g [] = []
g (x:xs) = (a,x) : g xs
Apologies if I'm wasting bandwidth with my ignorance.
Todd Wilson
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/haskell-cafe/attachments/20201124/d5e6aa45/attachment.html>
More information about the Haskell-Cafe
mailing list