packages feed

disco-0.1.0.0: lib/oeis.disco

using Primitives

||| Look up a sequence of integers using https://oeis.org
!!!  lookupSequence [] == left(unit)
!!!  lookupSequence [1,1,2,3] == right "https://oeis.org/A000045"
lookupSequence : List(N) -> Unit + List(Char)
lookupSequence = $lookupSequence

||| Extend a known sequence of integers with data from https://oeis.org
!!!  extendSequence [] == []
!!!  extendSequence [1,1,2,3,5] == [1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, 144, 233, 377, 610, 987, 1597, 2584, 4181, 6765, 10946, 17711, 28657, 46368, 75025, 121393, 196418, 317811, 514229, 832040, 1346269, 2178309, 3524578, 5702887, 9227465, 14930352, 24157817, 39088169, 63245986, 102334155]
extendSequence : List(N) -> List(N)
extendSequence = $extendSequence