I have no idea why it doesn't work (I got the same result) but if you rewrite it as:
let calcPowerSet =
let rec innerCalc =
function
| ([], []) -> [[]]
| ((head::tail), (cHead::cTail)) ->
innerCalc (tail, (cHead::cTail)) @ innerCalc (tail, (head::cHead::cTail))
| ((head::tail), []) ->
innerCalc (tail, []) @ innerCalc (tail, [head])
| ([], collect) -> [collect]
innerCalc
it seems to work fine under Mac (intel) with Mono 2.4 and F# 1.9.6.2
Johan Kullbom
2009-05-08 05:28:34