bsl / oeis

Haskell interface to the Online Encyclopedia of Integer Sequences
Other
6 stars 6 forks source link

Make searching Language correctly #12

Closed 23prime closed 6 years ago

23prime commented 6 years ago

To get Meple function from OEIS, I want to use lookup for Maple :: Language.

But, No instance for (Eq Language). So, Make Language an instance of the Eq for looking

And then, I did the following.

ghci>(lookup Maple . programs) =<< lookupSequenceByID "A000001"
Just "FiniteGroupCount[Range[100]] (* _Harvey P. Dale_, Jan 29 2013 *)"

This result "FiniteGroupCount[Range[100]] (* _Harvey P. Dale_, Jan 29 2013 *)" is not Maple but Mathematica function. Similar results were obtained by other IDs.

So, swap conditions of Maple and Mathematica in addElement.

niteria commented 6 years ago

Great catch, thank you!