In other news, I dabbled a little more with F# over the past days. The BigInt stuff seems to be missing a lot, and the intellisense on stuff seems wonky. For list/List at least, it tends to oscillate between three visible types; only one really containing the useful (if sometimes terribly named) bits.
I found a few more pattern matching examples ( (n::_) for something starting a list for example) which make it a little niftier than sugar for if/else blocks. Still a disappointment. The style does though lend itself very, very nicely towards algorithm implementation. I got half through an implementation of the quadratic sieve before I realized that BigInt kinda sucked.
So I went on to a traditional interview question that I've always seemed to have trouble with: "Reverse a string in place."
let rec reverse a = match a with | [] -> [] | _ -> (reverse (List.tl a)) @ [List.hd a]
Still fairly newbish with the language, but it took 1 shot and about a minute. No BS pointer arithmetic; straight-forward and easy to remember. Now if only this tl/hd/car/cdr bull could go the way of "let's see how much we can do in one line of code!" perl.
God I hate that stuff.
then u can '_ -> failwith "?"'.