Advertisement
niktkolwiek

L PP Lista 9 Oz

Dec 5th, 2011
1,496
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Oz 0.39 KB | None | 0 0
  1. %Zad2
  2. declare
  3. fun {Insert Slownik#Slowo}
  4.    local fun {Ins Snk}
  5.         case Snk
  6.         of H|T then local wyraz(Swo#Wyst)= H in
  7.                if Swo==Slowo then wyraz(Swo#Wyst+1)|T
  8.                elseif Slowo<Swo then wyraz(Slowo#1)|H|T
  9.                else H|{Ins T}
  10.                end
  11.             end
  12.            [] nil then [wyraz(Slowo#1)]
  13.         end
  14.      end
  15.    in {Ins Slownik} end
  16. end
  17.  
  18. {Show {Insert{Insert{Insert {Insert nil#1}#2}#1}#0}}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement