on 492ae2f help sign in
40 lines 711 B history raw
1### `++moon`
3Mime type to `++cord`
5Renders a [mime](http://en.wikipedia.org/wiki/MIME) type path with infix
6`/` to a [`++cord`]().
7Accepts
8-------
10`myn` is a ++[`mite`](), a [`++list`]() of [`@ta`]().
12Produces
13--------
15A `++cord`.
17Source
18------
20 ++ moon :: mime type to text
21 |= myn=mite
22 %+ rap
23 3
24 |- ^- tape
25 ?~ myn ~
26 ?: =(~ t.myn) (trip i.myn)
27 (weld (trip i.myn) `tape`['/' $(myn t.myn)])
28 ::
30Examples
31--------
33 ~zod/try=> `@t`(moon /image/png)
34 'image/png'
35 ~zod/try=> `@t`(moon /text/x-hoon)
36 'text/x-hoon'
37 ~zod/try=> `@t`(moon /application/x-pnacl)
38 'application/x-pnacl'