fork download
  1. import System
  2. local
  3. fun lazy {Times N H}
  4. case H of nil then
  5. nil
  6. [] Head|Tail then
  7. Head*N | {Times N Tail}
  8. end
  9. end
  10. fun lazy {Merge Xs Ys}
  11. case Xs of nil then
  12. Ys
  13. [] X|Xr then
  14. case Ys of nil then
  15. nil
  16. [] Y|Yr then
  17. if X < Y then
  18. X|{Merge Xr Ys}
  19. elseif X > Y then
  20. Y|{Merge Xs Yr}
  21. else
  22. X|{Merge Xr Yr}
  23. end
  24. end
  25. end
  26. end
  27. proc {Touch N H}
  28. case H of nil then
  29. {Browse "koniec"}
  30. [] Head|Tail then
  31. if N > 0 then
  32. {Browse Head}
  33. {Touch N-1 Tail}
  34. end
  35. end
  36. end
  37. fun {Hamming H N}
  38. if N > 0 then
  39. H | {Hamming {Merge {Merge {Times 2 H} {Times 3 H}} {Times 5 H}} N-1}
  40. else
  41. nil
  42. end
  43. end
  44. in
  45. {Touch 10 {Hamming [1] 100}}
  46. end
  47.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
Mozart Compiler 1.4.0 (20080704) playing Oz 3

%%% feeding file prog.oz

%*************************** parse error ************************
%**
%** syntax error, unexpected T_local, expecting T_ENDOFFILE
%**
%** in file "./prog.oz", line 2, column 0
%** ------------------ rejected (1 error)
stdout
Standard output is empty