<pre lang="F#"> let zad44 = let zad4 acc lst = match lst with | current::rest -> match current with | head::_ when acc < head -> (acc::current)::rest // add acc to current list | _ -> [acc]::lst // start new list | _ -> [[acc]] zad4;; List.foldBack zad44 [5;2;3;2;4;0;-1;5;3;0;1;5;] [] ;;</pre>
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)