<div dir="ltr"><div><br></div>Have a look at the HaskellForMaths package.<div><br></div><div>Using the Math.Algebra.Group.PermutationGroup module the expression `elts (_A n)` will return all the permutations of A_n.<br><br>On Thursday, May 26, 2016 at 6:39:52 PM UTC-5, Blake Sims wrote:<blockquote class="gmail_quote" style="margin: 0;margin-left: 0.8ex;border-left: 1px #ccc solid;padding-left: 1ex;"><div dir="ltr">Hi,<div><br></div><div>I am a newb to Haskell and programming in general, but I was trying to write a basic program to find the elements for the alternating group for any n.</div><div><br></div><div>For the symmetric group I wrote something like this</div><div><br></div><div>input Data.List</div><div><br></div><div>symmetric n = permutations ([1..n])</div><div><br></div><div>What if I just want to find the even permutations? Â What is the quick and dirty way of doing this? Â I was looking at the package Data.Matrix and messing around with permutation matrices, but there has got to be a quicker and easier way of doing it. I am skimming the book learn you a Haskell, but my attention span is pretty short so if someone could direct me in the right direction I'd be much obliged. Â </div></div></blockquote></div></div>