fork download
  1. functor
  2. import
  3. System
  4. local
  5. fun lazy {Times N H}
  6. case H of nil then
  7. nil
  8. [] Head|Tail then
  9. Head*N | {Times N Tail}
  10. end
  11. end
  12. fun lazy {Merge Xs Ys}
  13. case Xs of nil then
  14. Ys
  15. [] X|Xr then
  16. case Ys of nil then
  17. nil
  18. [] Y|Yr then
  19. if X < Y then
  20. X|{Merge Xr Ys}
  21. elseif X > Y then
  22. Y|{Merge Xs Yr}
  23. else
  24. X|{Merge Xr Yr}
  25. end
  26. end
  27. end
  28. end
  29. proc {Touch N H}
  30. case H of nil then
  31. {System.showInfo "koniec"}
  32. [] Head|Tail then
  33. if N > 0 then
  34. {System.showInfo Head}
  35. {Touch N-1 Tail}
  36. end
  37. end
  38. end
  39. fun {Hamming H N}
  40. if N > 0 then
  41. H | {Hamming {Merge {Merge {Times 2 H} {Times 3 H}} {Times 5 H}} N-1}
  42. else
  43. nil
  44. end
  45. end
  46. in
  47. {Touch 10 {Hamming [1] 100}}
  48. end
  49.  
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_end
%**
%** in file "./prog.oz", line 4, column 0
%** ------------------ rejected (1 error)
stdout
Standard output is empty