plus, minus :: Num a => [a] -> [a] -> [a]
plus = zipWith (+)
minus = zipWith (-)Here every valid input is an infinite coefficient list. If finite polynomial coefficient lists were admitted, they would need zero-padding before these definitions: ordinary list zip otherwise truncates to the shorter length.
Articles by others on the same topic
There are currently no matching articles.