{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "This is a sample perl 6 notebook. Cells can be Markdown or Perl 6. Context is stored on the server." ] }, { "cell_type": "code", "execution_count": 1, "metadata": { "scrolled": true }, "outputs": [ { "data": { "text/plain": [ "hello, world" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "\"hello, world\"" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "-1+1.22464679914735e-16i" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "e ** (i * π)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "[...]" ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "my @fib = 1, 1, * + * ... ∞" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1 1 2 3 5 8 13 21 34 55 89)" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "@fib[0..10]" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "name": "stdout", "output_type": "stream", "text": [ "here is some output\n" ] }, { "data": { "text/plain": [ "42" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "say \"here is some output\";\n", "42" ] }, { "cell_type": "code", "execution_count": 6, "metadata": {}, "outputs": [ { "data": { "text/plain": [ "(1 2 4 8 16 32 64 128 256 512)" ] }, "execution_count": 6, "metadata": {}, "output_type": "execute_result" } ], "source": [ "1,2,4...1000" ] } ], "metadata": { "kernelspec": { "display_name": "Perl 6", "language": "perl6", "name": "perl6" }, "language_info": { "file_extension": ".p6", "mimetype": "text/plain", "name": "perl6", "version": "6.c" } }, "nbformat": 4, "nbformat_minor": 2 }