brool

brool \brool\ (n.) : a low roar; a deep murmur or humming

Archive for October, 2006

Ocaml Quiz

Wednesday, October 25th, 2006
Quick, an Ocaml quiz: What is the best way to write a summation function? [code lang='ocaml'] let sum a = List.fold_left (fun x total -> x+total) 0 a [/code] or [code lang='ocaml'] let sum a = List.fold_right (fun x total -> x+total) a 0 [/code] – What is the best way to write this function? [...]