[Haskell-beginners] A simple remove function

bahadýr altan doaltan at yahoo.co.uk
Sun Feb 19 19:00:45 CET 2012

Hello. I'm trying to write a code which deletes the wanted element in a list. Like this :  myremove "doaltan" 3 = "doltan". I wrote the code below but it doesn't even compile. Could you help me with fixing the code? Thanks!

myremove x s = (take  (s-1) x):(drop (s+1) x)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20120219/956d3dd9/attachment.htm>

More information about the Beginners mailing list