Extracting Leaf paths from n-ary tree in F#
问题 Inspired by this question, I wanted to try my hand at the latest ponder this challenge, using F# My approach is probably completely off course, but in the course of solving this problem, I'm trying to get a list of all the permutations of the digits 0-9. I'm looking at solving it using a n-ary tree like so: type Node = | Branch of (int * Node list) | Leaf of int I'm quite pleased with myself, because I've managed to work out how to generate the tree that I want. My problem now is that I can't