[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...
More information about the Beginners