Skip to content

Commit 33a295f

Browse files
committed
APL: Add examples
1 parent 11ff829 commit 33a295f

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

examples/prism-apl.html

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
<h1>APL</h1>
2+
<p>To use this language, use the class "language-apl".</p>
3+
4+
<h2>Comments</h2>
5+
<pre><code>#!/usr/bin/env runapl
6+
a←1 2 3 ⍝ this is a comment</code></pre>
7+
8+
<h2>Strings</h2>
9+
<pre><code>''
10+
'foobar'
11+
'foo''bar''baz'</code></pre>
12+
13+
<h2>Numbers</h2>
14+
<pre><code>42
15+
3.14159
16+
¯2
17+
18+
2.8e¯4
19+
2j3
20+
¯4.3e2J1.9e¯4</code></pre>
21+
22+
<h2>Primitive functions</h2>
23+
<pre><code>a+b×c⍴⍳10</code></pre>
24+
25+
<h2>Operators</h2>
26+
<pre><code>+/ f⍣2</code></pre>
27+
28+
<h2>Dfns</h2>
29+
<pre><code>{0=⍴⍴⍺:'hello' ⋄ ∇¨⍵}</code></pre>
30+
31+
<h2>Known failures</h2>
32+
<p>There are certain edge cases where Prism will fail.
33+
There are always such cases in every regex-based syntax highlighter.
34+
However, Prism dares to be open and honest about them.
35+
If a failure is listed here, it doesn’t mean it will never be fixed. This is more of a “known bugs” list, just with a certain type of bug.
36+
</p>
37+
38+
<h3>Comment-like substrings</h3>
39+
<pre><code>'This string is ⍝ broken'</code></pre>

0 commit comments

Comments
 (0)