APL is the greatest language ever
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
ex Create all-numbers.apl Jan 29, 2018
mastering-dyalog-apl Create d10.apl Jun 10, 2017
_terminate_program.apl It seems we're off to explore APL land! Sep 27, 2015
assign.apl Add selective, indexing, etc, assignment Mar 5, 2016
cat.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
commute.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
compare.apl Add compare Oct 23, 2015
compose.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
depth-match.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
each.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
element-s.apl Add an example with rho-reshape to element-s Oct 23, 2015
enclose.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
first-pick.apl Re-add first-pick, missing Mar 5, 2016
function.apl Fix #9, add ⍵⍵/⍺⍺ Mar 2, 2016
grade.apl Add APL Grading Oct 23, 2015
index.apl Iota is index Oct 23, 2015
inner-product.apl Add a document with the explanations Oct 22, 2015
key.apl ⌸ key.apl Jul 20, 2017
logic.apl Add compare Oct 23, 2015
mix-take.apl Fix #20 Mar 5, 2016
not-without.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
outer-product.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
pointfree.apl Add pointfree Mar 5, 2016
rand.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
rank.apl oops Mar 5, 2016
readme.md Jul 20, 2017
reduce-replicate.apl Dyalogize / fix a few mistakes in the code Mar 2, 2016
rev-rot-first.apl Reverse/rotate first Oct 22, 2015
rev-rot.apl Reverse/rotate first Oct 22, 2015
runapl Dyalogize / fix a few mistakes in the code Mar 2, 2016
shaped.apl Replace mix-pick with mix-take Mar 2, 2016
short-circuit.apl Add stuff! Nov 2, 2015
split-drop.apl Add split-drop Mar 5, 2016
statement.apl Add stuff! Nov 2, 2015
tally-notmatch.apl Add depth-match Nov 2, 2015
variant.apl Add variant Feb 27, 2017

readme.md

Trying APL

This repository contains a handful of basic APL snippets, demonstrating each and every operator's purpose and behavior. The ex/ directory contains a few examples, mostly from Programming Puzzles & Code Golf Stack Exchange.

Table of contents

Evolution level: 1

Filename Symbol name Symbol Monadic Dyadic Operator (higher-order)
assign left arrow Assignment
index iota Index Generator Index of
reduce-replicate slash / Replicate Reduce
shaped rho Shape-of Reshape
mix-take up arrow Mix Take
enclose left shoe Enclose Partitioned enclose
first-pick right shoe First Pick
rand question mark ? Roll Deal
commute tilde dieresis Commute
element-s epsilon Enlist (flat) Membership
rev-rot circle stile Reverse (inner) Rotate (inner)
rev-rot-first circle bar Reverse first (outer) Rotate first (outer)
not-without tilde ~ Not Without
cat comma , Ravel Concatenate
logic Logical {N,}{and,or} ∧, ∨, ⍲, ⍱ and, or, nand, nor
compare {Not,} Equal | {Greater,Lower} than{,or equal} <, >, ≤, ≥, =, ≠ lower, greater, lower-or-eq, greater-or-eq, eq, not-eq
grade grade {up,down} ⍋ (up), ⍒ (down) Grade {Up,Down} Dyadic Grade {Up,Down}
each dieresis ¨ Each
function braces { and } (monadic argument) / ⍵⍵ (function monadic argument) (dyadic argument) / ⍺⍺ (function dyadic argument) Function
depth-match equal underbash Depth Match
tally-notmatch equal underbash slash Tally Not-match
statement diamond Statement separator
short-circuit colon : returns ⍵ from ∇ if ⍺=1
compose jot Monadic compose (e.g.: ⍴∘⍴) / Currying
pointfree (implicit composition)
inner-product dot . Inner product (e.g.: +.×)
outer-product jot + dot ∘. Outer product (e.g.: ∘.+)
rank jot diaerisis (⍵ is the new rank of the operator) changes the rank of ⍺⍺
variant quad colon Sets option value
key quad equal Returns an scalar vector (key, positions for the key)