<div dir="ltr"><div><div>Hi Angus,<br><br>You map the drop function over the list.<br><br></div>Something like this will do<br></div><br>foo xs = map (take 8) xs<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jan 2, 2014 at 5:08 PM, Angus Comber <span dir="ltr"><<a href="mailto:anguscomber@gmail.com" target="_blank">anguscomber@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr"><div>I have a list like this:</div><div><br></div><div>[[1,0,0,0,1,1,1,0,0],[1,1,1,0,1,1,1,0,0],[1,0,1,0,0,1,1,0,0],[0,1,0,0,1,1,1,0,0],[0,0,1,0,1,1,1,0,0],[1,0,0,1,1,1,1,0,1]]</div><div><br></div><div>The 'inner' list is a list of 9 items. I want to process the list so that a list of lists is returned but the 9th element in each inner list is dropped.</div>
<div><br></div><div>So the function type would be [[a]] -> [[a]]</div><div><br></div><div>So to get started I wrote a function like this:</div><div><br></div><div>discardparitybyte :: [[Bit]] -> [[Bit]]</div><div><br>
</div><div>But then not sure how to transform the inner list.</div><div><br></div><div>I know I can access the first inner element using take 1 list. But how do I then access/manipulate this inner list?</div><div><br></div>
<div>discardparitybyte (x:xs) = take 9 ??? (take 1 xs) : discardparitybyte ???<br></div></div>
<br>_______________________________________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/mailman/listinfo/beginners</a><br>
<br></blockquote></div><br></div>