<div dir="ltr">Hey,<div><br></div><div>I don't currently have the time to go into details, but you might want to take look at this:</div><div><br></div><div><a href="https://github.com/Daniel-Diaz/matrix/blob/555cb93a759536cd9ff03059ec4b813640607c89/Data/Matrix.hs#L177">https://github.com/Daniel-Diaz/matrix/blob/555cb93a759536cd9ff03059ec4b813640607c89/Data/Matrix.hs#L177</a><br></div><div><br></div><div>It is inspired by tensor product.</div><div><br></div><div>Monad is not possible though. Think about how would you implement the 'join' function.</div><div><br></div><div>I hope that helps!</div><div><br></div><div>Best,</div><div>Daniel Díaz.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Feb 9, 2016 at 3:02 AM, Strikingwolf2012 . <span dir="ltr"><<a href="mailto:strikingwolf2012@gmail.com" target="_blank">strikingwolf2012@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">I have been writing code encoding matrices <a href="https://github.com/Strikingwolf/Learning/blob/master/haskell/src/math/Matrix.hs" target="_blank">here</a> as a learning experience. However, I cannot figure out a method to make Matrix an instance of Applicative and Monad. I believe it is possible, but I cannot find an implementation. For context my form of Matrix does not have a requirement to be of integers, it is just a 2-Dimensional array in essence. Thank you in advance for any help you may provide :)</div>
<br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe" rel="noreferrer" target="_blank">http://mail.haskell.org/cgi-bin/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br></div>