我收到以下代码的“程序:前奏曲。(!!):索引太大”错误:
select :: Field -> Field -> Table -> Table
select column_name column_value (header:t) = header:filterT t
where filterT = filter testR
field_idx = (elemIndices column_name header)!!0
testR r | r!!field_idx == column_value = True
testR r | otherwise = False
我想错误与代码的以下部分有关:
field_idx = (elemIndices column_name header)!!0
testR r | r!!field_idx == column_value = True
有谁知道它为什么给我这个错误或我该如何解决它?