Coder Social home page Coder Social logo

trying.apl's Introduction

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)

trying.apl's People

Contributors

rightfold avatar rikedyp avatar vendethiel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

trying.apl's Issues

remove non-alphanumeric characters for palindrome

  • use element-of to find which elements are part of the string, then use / to filter (as in 0 1/'ab').
  • the filtering itself (take only elements that are in a and b) could probably be another example, though ;-).
  • And that use of / probably needs to be documented
  • demonstrate ~ as 'remove from'

add ⍠⌸⍣⌹

especially ⍣ used with ⌸ to create fix (which should be its own example!)

Add intro?

The tables are completely unreadable on mobile. Do you think you can throw a one paragraph description on the top of the readme to encourage people to link the repo?

more compose

Compose: (f g) Y
Compose: (A g) Y
Compose: (f B) Y
Compose: X (f g) Y

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.