let rec findBeginnings nodelist = match nodelist with x::tail -> if isInputNode x then x.id :: findBeginnings tail else findBeginnings tail | _ -> []