Data update

This commit is contained in:
Ingy döt Net 2025-02-27 18:35:13 -05:00
parent 8e4e15fa56
commit 72eb4943cb
1853 changed files with 35514 additions and 9441 deletions

View file

@ -0,0 +1,9 @@
infixl 7 *.
(*.) :: Num a => a -> [a] -> [a]
x *. (p:ps) = x*p : x*.ps
instance Num a => Num [a] where
negate = map negate
(+) = zipWith (+)
(*) (p:ps) (q:qs) = p*q : ((p*.qs) + ps*(q:qs))
fromInteger n = fromInteger n:repeat 0

View file

@ -0,0 +1,2 @@
catalan :: [Integer]
catalan = 1 : catalan^2

View file

@ -0,0 +1,2 @@
ghci> take 15 catalan
[1,1,2,5,14,42,132,429,1430,4862,16796,58786,208012,742900,2674440]