{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Example notebook" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "done\n", "\n", "Rebuilding user command cache... done\n", "" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f←+/÷≢" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [ { "data": { "text/html": [ "2\n", "" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "f 1 2 3" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "]dinput\n", "g←{\n", " +/⍵÷≢⍵\n", "}" ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "2\n", "" ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "g 1 2 3" ] }, { "cell_type": "code", "execution_count": 5, "metadata": {}, "outputs": [ { "data": { "text/html": [ "4 4 6\n", "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" }, { "data": { "text/html": [ "0 0 0 2 0 1\n", "" ] }, "execution_count": 5, "metadata": {}, "output_type": "execute_result" } ], "source": [ "⍸ 0 0 0 2 0 1\n", "⍸⍣¯1 ⊢ 4 4 6" ] } ], "metadata": { "kernelspec": { "display_name": "Dyalog APL", "language": "apl", "name": "dyalog-kernel" }, "language_info": { "file_extension": ".apl", "mimetype": "text/apl", "name": "APL" } }, "nbformat": 4, "nbformat_minor": 4 }