3 ms·
OK, I know this isn't nice but it's already part of the way there writeArray arr (i,j) =<< ((+) <$> readArray arr (i,j-1) <*> readArray arr (i-1,j))
by tome 9y ago
OK, I know this isn't nice but it's already part of the way there
writeArray arr (i,j) =<< ((+) <$> readArray arr (i,j-1) <*> readArray arr (i-1,j))