fun make_alt_record (stringlists, {x, y, z}) =
case generate_alts (stringlists, x) of
[] => {x, y, z}
| alt::stringlists' => {name, y, z}
generate_alts 使用一个字符串列表 list 和一个字符串,并生成一个字符串列表。make_alt_record 应该生成一个新记录。
相反,它会生成错误,如下所示:
hw2provided.sml:48.6-48.8 Error: syntax error: replacing DARROW with LPAREN
hw2provided.sml:49.23-49.25 Error: syntax error: replacing DARROW with AS
hw2provided.sml:65.1 Error: syntax error found at EOF