소스 검색

week5 done

master
Thorn Avery 4 년 전
부모
커밋
016dc8728d
1개의 변경된 파일18개의 추가작업 그리고 6개의 파일을 삭제
  1. +18
    -6
      week5/morse.hoon

+ 18
- 6
week5/morse.hoon 파일 보기

@@ -1,14 +1,27 @@
:: the comment ":: code belongs here" indicates that one or more lines of code are needed to make this section of the program work.

|= raw=tape
=<
:: code belongs here
=. raw (cuss raw)
(convert raw)
|%
:: the latest and greatest rapper
|= l=@t
?|
&((gte l 'A') (lte l 'Z'))
&((gte l '0') (lte l '9'))
==
++ convert
:: code belongs here
:: (~(got by a) b) produces the value located at key b within map a
=/ chart ~(got by table)
:: code belongs here
|= m=tape
^- tape
%- zing
%+ turn m
|= l=@t
?: =(l ' ')
"[_]"
?: (mcelem l)
~[' ' (~(got by table) l) ' ']
~['[' l ']']
++ table
%- my
:~ :- 'A' '.-'


불러오는 중...
취소
저장