<div dir="ltr">I like that :)</div><div class="gmail_extra"><br><br><div class="gmail_quote">On 2 January 2014 15:31,  <span dir="ltr"><<a href="mailto:smekesis@csd.auth.gr" target="_blank">smekesis@csd.auth.gr</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Angus! Take a look at the following function:<br>
<br>
discardParityByte :: [[Integer]] -> [[Integer]]<br>
discardParityByte = map init<br>
<br>
It returns a list constructed by applying "init" to all items in the list you pass in. "init" accepts a list and returns the list without its last item.<br>
<br>
Stavros Mekesis.<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
Quoting Angus Comber <<a href="mailto:anguscomber@gmail.com" target="_blank">anguscomber@gmail.com</a>>:<br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a list like this:<br>
<br>
[[1,0,0,0,1,1,1,0,0],[1,1,1,0,<u></u>1,1,1,0,0],[1,0,1,0,0,1,1,0,0]<u></u>,[0,1,0,0,1,1,1,0,0],[0,0,1,0,<u></u>1,1,1,0,0],[1,0,0,1,1,1,1,0,1]<u></u>]<br>
<br>
The 'inner' list is a list of 9 items.  I want to process the list so that<br>
a list of lists is returned but the 9th element in each inner list is<br>
dropped.<br>
<br>
So the function type would be [[a]] -> [[a]]<br>
<br>
So to get started I wrote a function like this:<br>
<br>
discardparitybyte :: [[Bit]] -> [[Bit]]<br>
<br>
But then not sure how to transform the inner list.<br>
<br>
I know I can access the first inner element using take 1 list.  But how do<br>
I then access/manipulate this inner list?<br>
<br>
discardparitybyte (x:xs) = take 9 ??? (take 1 xs) : discardparitybyte ???<br>
</blockquote>
<br>
<br>
<br></div></div><div class="HOEnZb"><div class="h5">
______________________________<u></u>_________________<br>
Beginners mailing list<br>
<a href="mailto:Beginners@haskell.org" target="_blank">Beginners@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/beginners" target="_blank">http://www.haskell.org/<u></u>mailman/listinfo/beginners</a><br>
</div></div></blockquote></div><br></div>