我正在完成chapter 12 of Real World Haskell。在本章中,作者解釋瞭如何使用EAN13 encoding執行條形碼識別。 我轉載的大多數代碼從the book snippets into my repo,當我終於來到檢查是否按預期工作在我的超過300行的代碼,我得到了一個壞消息: -- Finding the Correct Sequence
*Main> let i
我有一段代碼,在Python3效果很好: def encode_test(filepath, char_to_int):
with open(filepath, "r", encoding= "latin-1") as f:
dat = [line.rstrip() for line in f]
string_to_int = [[char_to_int[char