My work for Hoon 101. Will remain private until the class is over.
Nie możesz wybrać więcej, niż 25 tematów Tematy muszą się zaczynać od litery lub cyfry, mogą zawierać myślniki ('-') i mogą mieć do 35 znaków.

65 wiersze
1.3KB

  1. :: the comment ":: code belongs here" indicates that one or more lines of code are needed to make this section of the program work.
  2. |= raw=tape
  3. =<
  4. =. raw (cuss raw)
  5. (convert raw)
  6. |%
  7. :: the latest and greatest rapper
  8. ++ mcelem
  9. |= l=@t
  10. ?|
  11. &((gte l 'A') (lte l 'Z'))
  12. &((gte l '0') (lte l '9'))
  13. ==
  14. ++ convert
  15. |= m=tape
  16. ^- tape
  17. %- zing
  18. %+ turn m
  19. |= l=@t
  20. ?: =(l ' ')
  21. "[_]"
  22. ?: (mcelem l)
  23. ~[' ' (~(got by table) l) ' ']
  24. ~['[' l ']']
  25. ++ table
  26. %- my
  27. :~ :- 'A' '.-'
  28. :- 'B' '-...'
  29. :- 'C' '-.-.'
  30. :- 'D' '-..'
  31. :- 'E' '.'
  32. :- 'F' '..-.'
  33. :- 'G' '--.'
  34. :- 'H' '....'
  35. :- 'I' '..'
  36. :- 'J' '.---'
  37. :- 'K' '-.-'
  38. :- 'L' '.-..'
  39. :- 'M' '--'
  40. :- 'N' '-.'
  41. :- 'O' '---'
  42. :- 'P' '.--.'
  43. :- 'Q' '--.-'
  44. :- 'R' '.-.'
  45. :- 'S' '...'
  46. :- 'T' '-'
  47. :- 'U' '..-'
  48. :- 'V' '...-'
  49. :- 'W' '.--'
  50. :- 'X' '-..-'
  51. :- 'Y' '-.--'
  52. :- 'Z' '--..'
  53. :- '0' '-----'
  54. :- '1' '.----'
  55. :- '2' '..---'
  56. :- '3' '...--'
  57. :- '4' '....-'
  58. :- '5' '.....'
  59. :- '6' '-....'
  60. :- '7' '--...'
  61. :- '8' '---..'
  62. :- '9' '----.'
  63. ==
  64. --