[Haskell-beginners] A simple function

Ezequiel Hernan Di Giorgi hernan.digiorgi at gmail.com
Thu Aug 30 14:52:42 CEST 2012

Hallo liebe Leute. Hola gente. I'm starting with Haskell and i have some

*intercalate :: [t] -> [t] -> [t]*
*intercalate [a,b] [c,d] = [a,c,b,d]*
*intercalate (_) (_) = error "JOJO u cant do this"*

Are there any form to restrict the parmaters that only allow to call the
function *intercalate* with two arrays of two elements, in compilation
time? Cause i cant write* intercalete :: [t,t] -> [t,t]->[t,t,t,t]*.

Sorry for my bad english. I'm Argentinean.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120830/ea7d2d8e/attachment.htm>

More information about the Beginners mailing list