我讀一個CSV文件轉換成namedtuple像這樣: import csv
from collections import namedtuple
#So we can handle bad CSV files gracefully
def unfussy_reader(reader):
while True:
try:
yield next(reader
我有一個任務來創建map_reverse函數。 let rec map_rev func = function
[] -> []
| h::t -> map_rev func t @ func h;;
let f x = x * 7;;
open Printf
let a = map_rev f [1;2;10;20;400]
let() = List.iter