let array_to_wolfram = Femtolib.Array.fold_lefti (fun i accu bit -> if bit then accu + 1 lsl i else accu) 0