我无法从辅助函数获取输出以匹配我正在使用以下代码的函数的输出:
getSemiDiag :: [[Maybe Player]] -> Int -> Int -> [Maybe Player]
getSemiDiag [] _ _ = []
getSemiDiag (x:xs) start size = if start > (size -1)
then []
else (x !! start) : (getSemiDiag xs (start+1) size)
semiRight :: [[Maybe Player]] -> Int -> Int -> [[Maybe Player]]
semiRight [] _ _ = []
semiRight (x:xs) start size = if start > (size -1)
then []
else (getSemiDiag x start size) : (semiRight xs (start+1) size)
尽管我尽了最大努力,函数 semiRight 仍无法匹配。有什么想法吗?