Playground

Playground

This is a place to experiment with the theme, and Markdown rendering.

This page is ugly on purpose… (almost).

Technical

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
// Testing some code display. To be highlighted later.

String defaultAsString<Element>(Element? e) => e?.string else "";

shared String formatAsNewick<Element, ActualTreeNode>(ActualTreeNode root,
String(Element?) asString = defaultAsString<Element>)
given ActualTreeNode satisfies TreeNode<Element, ActualTreeNode>
{
// We need a custom iterator as we do a specific action on each step.
class PostOrderIteration(ActualTreeNode root)
{
function wrap(ActualTreeNode node)
{
return [ node, node.children.iterator() ];
}

Stack<[ ActualTreeNode, Iterator<ActualTreeNode> ]> stack = LinkedList<[ ActualTreeNode, Iterator<ActualTreeNode> ]>();
stack.push(wrap(root));

shared void iterate(StringBuilder sb)
{
// Cut for shortness...
}
}

value ppi = PostOrderIteration(root);
value sb = StringBuilder();
ppi.iterate(sb);

return sb.string;
}

Typography

Paragraphs and lists

A simple paragraph. Followed by an ordered list (OL).

  1. One
  2. Two
  3. Three
    Can have paragraph inside, too.

Then an unordered list. (UL)

  • One
  • Two
  • Three
    Here too, can have paragraph inside, too.

And a simple regular paragraph to conclude.

Inline code

We can have code in a paragraph: var p = _.find(persons, { name: Bond', surname: 'James' }); and even more.

Quote

Let’s try a quote:

Java is a simple language to learn and Java code is easy to read and understand. Java provides a level of typesafety that is appropriate for business computing and enables sophisticated tooling with features like refactoring support, code completion, and code navigation. Ceylon aims to retain the overall model of Java, while getting rid of some of Java's warts, and improving upon Java's facilities for creating abstractions and writing generic libraries and frameworks.

From the Ceylon Language Specification

Tables

Now, with tables (thead, tfoot, and tbody)

Caption of the table
First Header Second Header Last Header
Footer on Left Footer on Middle Footer on Right
Body content 1.1 Body content 2.1 Body content 3.1
Body content 1.2 Body content 2.2 Body content 3.2
Body content 1.3 Body content 2.3 Body content 3.3
That's all for now.