minus xs [] = xs minus (x:xs) (y:ys) = x-y : minus xs ys der [] = [] der (_:xs) = minus ys (0:0:ys)
Standard input is empty
[0,1] [1,0,-1] [0,-2,0,2] [-2,0,8,0,-6] [0,16,0,-40,0,24] [16,0,-136,0,240,0,-120] [0,-272,0,1232,0,-1680,0,720] [-272,0,3968,0,-12096,0,13440,0,-5040] [0,7936,0,-56320,0,129024,0,-120960,0,40320] [7936,0,-176896,0,814080,0,-1491840,0,1209600,0,-362880]